-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add an option for enable/disable webhook for a standard operator generated by kubebuilder #102
base: main
Are you sure you want to change the base?
Conversation
4ae4f03
to
826e4c4
Compare
@arttor Hi, could you please take a look at this? Thanks. |
826e4c4
to
b4f8439
Compare
Hi @dashanji, I am very sorry. Will only have time to check on the weekend. |
volumeMounts := ` - mountPath: /tmp/k8s-webhook-server/serving-certs | ||
name: cert | ||
readOnly: true` | ||
webhookPort := ` - containerPort: 9443 |
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.
is there a better way to handle webhooks? I've tried to search a couple of kubebuilder projects on GitHub and some of them are using different ports or yaml properties can be ordered differently so strings.ReplaceAll
will not work in most cases.
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.
Thanks for catching out, It looks like we could use the regular expression to handle these cases.
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.
@arttor Does such design make sense to you?
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.
yes, regular expressions look promising.
Hi @arttor, could you please take a look at this? Thanks. |
7c562c0
to
bcac65f
Compare
…nerated by kubebuilder. * Use regular expressions to match the containerPort of the webhook. Signed-off-by: Ye Cao <[email protected]>
bcac65f
to
d6f44f3
Compare
As titled. Fix #57.