From 4fa240578e4613f8fd4795601cc3349de81851ff Mon Sep 17 00:00:00 2001 From: Abel Perez Martinez Date: Sun, 29 May 2022 14:36:50 +0100 Subject: [PATCH 1/2] Added extra cli flag webhook-port --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index faf7d5af65..941ff4ddf7 100644 --- a/main.go +++ b/main.go @@ -81,6 +81,7 @@ func main() { autoInstrumentationNodeJS string autoInstrumentationPython string labelsFilter []string + webhookPort int ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") @@ -94,6 +95,7 @@ func main() { pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") + pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) @@ -148,7 +150,7 @@ func main() { mgrOptions := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, - Port: 9443, + Port: webhookPort, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "9f7554c3.opentelemetry.io", From 169c172ce7668b19dbfe8651fb1ff833f9d9ee71 Mon Sep 17 00:00:00 2001 From: Abel Perez Martinez Date: Sun, 29 May 2022 16:34:26 +0100 Subject: [PATCH 2/2] Fixed typo preventing the use of the cli flag health-probe-addr --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 941ff4ddf7..c7928d8555 100644 --- a/main.go +++ b/main.go @@ -85,7 +85,7 @@ func main() { ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") - flag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") + pflag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.")