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

Bug 1813937: Disable serving for cert regeneration controller to avoid wrong dependency #374

Merged
merged 1 commit into from Mar 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 28 additions & 21 deletions pkg/cmd/recoverycontroller/cmd.go
Expand Up @@ -22,27 +22,34 @@ type Options struct {
func NewCertRecoveryControllerCommand(ctx context.Context) *cobra.Command {
o := &Options{}

cmd := controllercmd.
NewControllerCommandConfig("cert-recovery-controller", version.Get(), func(ctx context.Context, controllerContext *controllercmd.ControllerContext) error {
o.controllerContext = controllerContext

err := o.Validate(ctx)
if err != nil {
return err
}

err = o.Complete(ctx)
if err != nil {
return err
}

err = o.Run(ctx)
if err != nil {
return err
}

return nil
}).NewCommandWithContext(ctx)
ccc := controllercmd.NewControllerCommandConfig("cert-recovery-controller", version.Get(), func(ctx context.Context, controllerContext *controllercmd.ControllerContext) error {
o.controllerContext = controllerContext

err := o.Validate(ctx)
if err != nil {
return err
}

err = o.Complete(ctx)
if err != nil {
return err
}

err = o.Run(ctx)
if err != nil {
return err
}

return nil
})

// Disable serving for recovery as it introduces a dependency on kube-system::extension-apiserver-authentication
// configmap which prevents it to start as the CA bundle is expired.
// TODO: Remove when the internal logic can start serving without extension-apiserver-authentication
// and live reload extension-apiserver-authentication after it is available
ccc.DisableServing = true

cmd := ccc.NewCommandWithContext(ctx)
cmd.Use = "cert-recovery-controller"
cmd.Short = "Start the Cluster Certificate Recovery Controller"

Expand Down