-
Notifications
You must be signed in to change notification settings - Fork 31
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
AuthConfig v1beta2 #417
AuthConfig v1beta2 #417
Changes from all commits
8b7acdd
1eaead9
7d4603c
3aada04
9a216b0
86455df
aca78c6
0599684
af96b5b
d968a60
99e5ecf
8eaeca1
d99b225
6202b26
c22d500
b556c26
3527edf
c70f9b6
cf14ba3
b61838f
7e92eaf
3207f52
3b12430
6b3ed14
278acb9
07a2a2f
c4416d1
bb89344
6c22f27
2fa28d7
166c088
bf6e068
5059dca
4343ef8
90ce6fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package v1beta1 | ||
|
||
// Hub marks this version as a conversion hub. | ||
func (a *AuthConfig) Hub() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -774,6 +774,7 @@ func (s *AuthConfigStatus) Ready() bool { | |
// AuthConfig is the schema for Authorino's AuthConfig API | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. considered adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not be done in this step. check my comment above. |
||
// +kubebuilder:storageversion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't be v1beta2 the one to be stored? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not necessarily. Usually, first you introduce a new version of the API and allow time for users to adapt; then the newer version becomes the stored one in a subsequent rolling update. This way, when they install the new version of the CRD, previously existing CRs based on the old version won't be a blocker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am missing something. If the stored version is the old one, even the clients of the new version will store CR with the old version. What I was assuming, and correct me if I am wrong, whenever a client updates / creates an object, if the object's version is not the stored one, the webhook conversion API will be called and the object converted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the Versions in CustomResourceDefinitions, the workflow for upgrading CRD version would be (high level):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excellent summary, @eguzki. Thank you for this! |
||
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.summary.ready`,description="Ready for all hosts" | ||
// +kubebuilder:printcolumn:name="Hosts",type=string,JSONPath=`.status.summary.numHostsReady`,description="Number of hosts ready" | ||
// +kubebuilder:printcolumn:name="Authentication",type=integer,JSONPath=`.status.summary.numIdentitySources`,description="Number of trusted identity sources",priority=2 | ||
|
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.
For the future, for this kind of tasks, I would use
kustomize
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.
Following the same pattern adopted by https://docs.kuadrant.io/getting-started/#set-up-clusters-and-multicluster-gateway-controller.
kustomize
is also bit more cumbersome when you need to support many options (even with overlays). Besides, it isn't much helpful for things like sequencing commands, e.g. https://github.com/Kuadrant/authorino-operator/blob/152a1627a0b2f5d36c3983192644ec8c5d625bad/utils/install.sh#L140