-
Notifications
You must be signed in to change notification settings - Fork 41
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
StatefulSetSpec::default()
already has a selector
and serviceName
when serializing
#112
Comments
StatefulSetSpec::default()
already has a selector and serviceName when serializingStatefulSetSpec::default()
already has a selector
and serviceName
when serializing
I think this comes down to a larger issue about when things are However, this makes less sense for patches, where almost no field is statically required since a missing value just means that it falls through to the old value. On the other hand, non-atomic values (objects that are not explicitly tagged as Maybe we will end up needing separate types to handle CRUD vs patch properly (either completely separate like Go handles it, or parametrized with some type mode mechanism). That seems unfortunate (both in terms of compile time and teachability), but I'm not sure I see a way around it... :/ |
Don't know if you've seen, but this is something they had to tackle on the go side as well with Apply* variants of all the structs. Basically an entirely parallel world of structs where everything is optional to get around this problem for server side apply. Stuff for it is under KEP 2155 and some of my notes under kube-rs/kube#649 |
Thanks for those links. For my reference:
|
Repro
Expected
Produced
Why is this a problem?
LabelSelector
andstring
are both atomic (see incurl $K8S_API/openapi/v2 | jq '.definitions."io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"'
that"x-kubernetes-map-type": "atomic"
), which means that server-side apply will replace them outright rather than trying to merge them. This prevents server-side apply from updatingStatefulSet
objects safely.Versions
The text was updated successfully, but these errors were encountered: