From 245601dbf365fa1917583c8d5ade81a308ee9c43 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Tue, 29 Mar 2022 10:53:08 +0200 Subject: [PATCH] Add command line flag to configure controller webhook server certificate directory --- controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controller.go b/controller.go index 22d5533c..1dc9af31 100644 --- a/controller.go +++ b/controller.go @@ -45,6 +45,7 @@ func ControllerCommand() *cobra.Command { usernamePrefix := cmd.Flags().String("username-prefix", "", "Prefix prepended to username claims. Usually the same as \"--oidc-username-prefix\" of the Kubernetes API server") rolePrefix := cmd.Flags().String("role-prefix", "control-api:user:", "Prefix prepended to generated cluster roles and bindings to prevent name collisions.") memberRoles := cmd.Flags().StringSlice("member-roles", []string{}, "ClusterRoles to assign to every organization member for its namespace") + webhookCertDir := cmd.Flags().String("webhook-cert-dir", "", "Directory holding TLS certificate and key for the webhook server. If left empty, {TempDir}/k8s-webhook-server/serving-certs is used") cmd.Run = func(*cobra.Command, []string) { scheme := runtime.NewScheme() @@ -69,6 +70,7 @@ func ControllerCommand() *cobra.Command { HealthProbeBindAddress: *probeAddr, LeaderElection: *enableLeaderElection, LeaderElectionID: "d9e2acbf.control-api.appuio.io", + CertDir: *webhookCertDir, }) if err != nil { setupLog.Error(err, "unable to setup manager")