-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Fix "list_type_missing" API violations in meta/v1 #121759
Conversation
@@ -102,6 +102,7 @@ type RawExtension struct { | |||
// Raw is the underlying serialization of this object. | |||
// | |||
// TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. | |||
// +listType=atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these look ~fine for now, but we could also fix the linter to not complain about []byte
"lists". cc @apelisse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, fair enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will back these out from this PR, but as a new commit for readability
@@ -102,6 +102,7 @@ type RawExtension struct { | |||
// Raw is the underlying serialization of this object. | |||
// | |||
// TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. | |||
// +listType=atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, fair enough.
/triage accepted |
c272280
to
2487c48
Compare
2b320aa
to
271c882
Compare
No longer WIP. I removed the config-API commit and we can look at those as a followup |
0f08de3
to
18f3941
Compare
/lgtm |
LGTM label has been added. Git tree hash: e246d6a9aeb09ef8381af91dca2a0778da23be3f
|
(unit test flake is #121926) |
/retest |
Should this PR be back-ported in 1.29 and others ? It might be useful for Customer Resources that includes native types into their definition, to have the full granularity for managedfields https://kubernetes.slack.com/archives/C0123CNN8F3/p1705594643726679 |
What specifically would this fix in SSA? the only two fields that actually changed anything effectively in this PR were ownerReferences and finalizers, right? neither of those were the ones mentioned in the linked slack thread Backporting API behavior to a minor doesn't seem like a great idea to me. Letting the change take effect in the next release seems more reasonable. |
Various fields in the PodSpec now have the proper listType and listMapKey annotations - thus for those that embed this type into their own CRDs they'll have the proper OpenAPI schema when generating these CRD definitions. |
Yeah that's fair - seems like the cherry-picker plugin isn't enabled anymore ;) |
Ah. Letting folks bump to k8s.io/api v0.30.0 when its released would let them regen with annotations, right? I'd probably opt for that.
it was never enabled for kubernetes/kubernetes, fyi |
This assumes that any such field is atomic, except:
+patchStrategy=merge
, but it probably needs a+listMapKey=...
?+patchStrategy=merge
, but is a primitive type (string).An alternative approach could be just to turn off the API warnings for these fields, but it felt more correct to declare the semantics.
If this flies I can do others.
@apelisse to tell me if I totally missed the mark on this assumption and to advise on the above.
@liggitt FYI
@deads2k For consult
/kind cleanup