mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
b3021f5a57
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
28 lines
664 B
Go
28 lines
664 B
Go
package openapi
|
|
|
|
// crdDefinitionPrior represents CRDs version prior to 1.16
|
|
var crdDefinitionPrior struct {
|
|
Spec struct {
|
|
Names struct {
|
|
Kind string `json:"kind"`
|
|
} `json:"names"`
|
|
Validation struct {
|
|
OpenAPIV3Schema interface{} `json:"openAPIV3Schema"`
|
|
} `json:"validation"`
|
|
} `json:"spec"`
|
|
}
|
|
|
|
// crdDefinitionNew represents CRDs version 1.16+
|
|
var crdDefinitionNew struct {
|
|
Spec struct {
|
|
Names struct {
|
|
Kind string `json:"kind"`
|
|
} `json:"names"`
|
|
Versions []struct {
|
|
Schema struct {
|
|
OpenAPIV3Schema interface{} `json:"openAPIV3Schema"`
|
|
} `json:"schema"`
|
|
Storage bool `json:"storage"`
|
|
} `json:"versions"`
|
|
} `json:"spec"`
|
|
}
|