New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.30 adds tags that break imagePullSecrets
#124540
Comments
/transfer kubernetes |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
cc @thockin /sig api-machinery even though these list types accurately reflect the structure / validation in built-in types, fields used as map keys must be required or defaulted when used in a CRD schema |
@pmalek If you add I'm not sure if the right answer is to make it required -- it SEEMS correct, considering it is the only field in the type :) -- or to rmeove that listMap (despite being correct in context) |
One of the types can be found here : https://github.com/Kong/gateway-operator/blob/main/api%2Fv1beta1%2Fdataplane_types.go I can do some testing when I find a moment. |
Which type in particular? |
The embedded PodTemplateSpec here https://github.com/Kong/gateway-operator/blob/main/api%2Fv1beta1%2Fshared_types.go#L35 seems to be causing issues. |
I'm trying to repro real quickly, but I can't get it to build.
So I installed mise into /tmp
OK, so I installed yq:
But still no luck:
I am out of time for the moment. |
Even though marked as From my CR, validation errors
|
@thockin Not sure what's up with I'd assume this was a problem with using In any case we've merged Kong/gateway-operator#230 to make sure to make no assumptions about the I believe the culprit of this is as @thockin suggested I've pushed #124553 as an attempt to fix this. |
debian |
Did you confirm that the +required actually satisfies your CRD? |
but that's already sorted out in latest
I've basically tried embedding
Which exist in k8s tree in PodTemplateSpec and then my changing the |
I'm bumping deps to v0.30.0 in KEDA and I'm facing the same issue during the CRD apply: "CustomResourceDefinition.apiextensions.k8s.io \"scaledjobs.keda.sh\" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[jobTargetRef].properties[template].properties[spec].properties[hostAliases].items.properties[ip].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[spec].properties[jobTargetRef].properties[template].properties[spec].properties[imagePullSecrets].items.properties[name].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property]" |
Problem statement
Using
code-generator
'sclient-gen
in version 1.30 adds several new fields to generated CRDs:This in turn makes the CRDs fail to be applied on the cluster (note: the CRD in question has
PodTemplateSpec
embedded as a field)Proposed solution
It would seem that
LocalObjectReference
(which is the underlying type ofImagePullSecrets
)is missing some code markers? Not sure at this moment.
The text was updated successfully, but these errors were encountered: