mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 23:46:56 +00:00
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"`
|
|
}
|