-
Notifications
You must be signed in to change notification settings - Fork 66
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
Use latest controller-gen, which allows CEL validations #1692
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1692 +/- ##
==========================================
+ Coverage 79.14% 79.16% +0.01%
==========================================
Files 163 163
Lines 15769 15769
==========================================
+ Hits 12481 12484 +3
+ Misses 2972 2970 -2
+ Partials 316 315 -1 |
@@ -116,6 +115,7 @@ spec: | |||
- kind | |||
- name | |||
type: object | |||
x-kubernetes-map-type: 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.
What does this do? Are we okay with this change?
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.
According to https://kubernetes.io/docs/reference/using-api/server-side-apply/,
Applicable to maps. atomic means that the map can only be entirely replaced by a single manager. granular means that the map supports separate managers updating individual fields.
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 think that this only applies to managedFields
, which does not appear to be used in Pinniped.
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.
Looking at this more closely, x-kubernetes-map-type: atomic
got applied to:
objectRef
, which is of typecorev1.TypedLocalObjectReference
jwks
,tokenSigningKey
,stateSigningKey
, andstateEncryptionKey
which are all of typecorev1.LocalObjectReference
So in all these cases the +structType=atomic
tag is coming from the authors of the corev1
package, so that seems fine. Presumably they know what they are doing with these server-side apply settings. :)
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.
Just to test the upgrade path, I tried applying this CRD from main
and then applying this CRD from this PR branch. It applied without complaint about adding x-kubernetes-map-type
to these fields. It did not seem to have any impact on my existing FederationDomain resource either. Seems like it worked fine to upgrade the CRD to add these settings.
0312e48
to
ac9887a
Compare
concourse-ci/integration-test-latest-fips flaked and I attempted a fix in #1695. In the meantime I reran that job for your PR. |
Use latest controller-gen, which allows CEL validations.
This PR is only a result of running
./hack/update.sh
to update the generated (and deploy) files. There are no manual changes here.See #185863937.