-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support disable installer #174
Support disable installer #174
Conversation
@mengqiy Took a quick look, looks good. Will take another detailed look in the afternoon. |
PTAL |
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.
Looks good, minor naming suggestions.
var enableInstaller bool | ||
flag.BoolVar(&enableInstaller, "enable-installer", false, | ||
"enable the installer in the webhook server, so it will install webhook related resources during bootstrapping") | ||
|
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.
shall we rename the flag to reflect the usage ? for ex. --install-webhook-config
?
pkg/webhook/server.go
Outdated
Dryrun bool | ||
// EnableInstaller controls if the server will automatically create webhook related objects | ||
// during bootstrapping. e.g. webhookConfiguration, service and secret. | ||
EnableInstaller bool |
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.
May be rename the flag ? ex. InstallWebhookConfig
?
pkg/webhook/server.go
Outdated
if err != nil || s.Dryrun { | ||
return err | ||
if s.EnableInstaller { | ||
log.Info("webhook installer is enabled") |
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.
We can improve the log --> installing webhook configuration in cluster ? or something for user-friendly.
29feb54
to
96e4f8e
Compare
Addressed comments. |
TypeMeta: metav1.TypeMeta{ | ||
APIVersion: "v1", | ||
Kind: "Secret", | ||
}, |
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.
As per my understanding, as long as the client has correct scheme (in this case scheme for core-types which is set by default), we don't need to set typemeta. Has anything changed ?
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: mengqiy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Support disable installer
This supersedes #158. But not having piece for generating manifests.