Skip to content
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

Merged
merged 3 commits into from
Oct 19, 2018

Conversation

mengqiy
Copy link
Member

@mengqiy mengqiy commented Oct 18, 2018

This supersedes #158. But not having piece for generating manifests.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 18, 2018
@droot
Copy link
Contributor

droot commented Oct 18, 2018

@mengqiy Took a quick look, looks good. Will take another detailed look in the afternoon.

@mengqiy
Copy link
Member Author

mengqiy commented Oct 18, 2018

PTAL

Copy link
Contributor

@droot droot left a 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")

Copy link
Contributor

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 ?

Dryrun bool
// EnableInstaller controls if the server will automatically create webhook related objects
// during bootstrapping. e.g. webhookConfiguration, service and secret.
EnableInstaller bool
Copy link
Contributor

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 ?

if err != nil || s.Dryrun {
return err
if s.EnableInstaller {
log.Info("webhook installer is enabled")
Copy link
Contributor

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.

@mengqiy
Copy link
Member Author

mengqiy commented Oct 19, 2018

Addressed comments.
Pushed one more commit to address an issue due to https://github.com/kubernetes/apimachinery/blob/master/pkg/runtime/register.go#L26-L29

TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Secret",
},
Copy link
Contributor

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 ?

@droot droot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 19, 2018
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 161208a into kubernetes-sigs:master Oct 19, 2018
@mengqiy mengqiy deleted the disable_installer branch October 19, 2018 18:32
justinsb pushed a commit to justinsb/controller-runtime that referenced this pull request Dec 7, 2018
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
…README.md

Also add message about sharing the book.

Fixes #174
Fixes #173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants