File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
tools/openapi2crd/pkg/plugins Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,17 @@ func (p *PrintConditions) Name() string {
1111}
1212
1313func (p * PrintConditions ) Process (req * MappingProcessorRequest ) error {
14+ // Given that new SDK versions are supported by different spec subfields, it
15+ // is unlikely there will be more than one supported Kubernetes version.
16+ //
17+ // The CRD validation fails if all versions use the same print columns, in
18+ // such case they have to be set at the top level to avoid errors.
19+ // Note that the produced YAML still places the print columns at the version
20+ // level anyways.
21+ //
22+ // Check out the upstream code for more details:
23+ // https://github.com/kubernetes/apiextensions-apiserver/blob/a780e0393511161d7ef1e6466035181a4f84f347/pkg/apis/apiextensions/validation/validation.go#L438C5-L438C34
24+ // https://github.com/kubernetes/apiextensions-apiserver/blob/a780e0393511161d7ef1e6466035181a4f84f347/pkg/apis/apiextensions/validation/validation.go#L762
1425 req .CRD .Spec .AdditionalPrinterColumns = []apiextensions.CustomResourceColumnDefinition {
1526 {
1627 JSONPath : `.status.conditions[?(@.type=="Ready")].status` ,
You can’t perform that action at this time.
0 commit comments