diff --git a/Makefile b/Makefile index 2758c060d..053a74f09 100644 --- a/Makefile +++ b/Makefile @@ -316,6 +316,7 @@ helm-install-provider: helm-version check-api-key --set registry=$(DOCKER_REGISTRY) \ --set imagePullPolicy=Always \ --set tag=$(VERSION) \ + --set controller.loglevel=debug \ --set controller.image.pullPolicy=Always \ --set ui.image.pullPolicy=Always \ --set controller.service.type=LoadBalancer \ diff --git a/go/pkg/app/app.go b/go/pkg/app/app.go index 585431487..1a7b7ce69 100644 --- a/go/pkg/app/app.go +++ b/go/pkg/app/app.go @@ -89,8 +89,6 @@ func init() { utilruntime.Must(v1alpha1.AddToScheme(scheme)) utilruntime.Must(v1alpha2.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme - - ctrl.SetLogger(zap.New(zap.UseDevMode(true))) } type Config struct { @@ -182,22 +180,16 @@ func Start(getExtensionConfig GetExtensionConfig) { flag.StringVar(&agent_translator.DefaultImageConfig.PullSecret, "image-pull-secret", "", "The pull secret name for the agent image.") flag.StringVar(&agent_translator.DefaultImageConfig.Repository, "image-repository", agent_translator.DefaultImageConfig.Repository, "The repository to use for the agent image.") - opts := zap.Options{ - Development: true, - } + opts := zap.Options{} opts.BindFlags(flag.CommandLine) flag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) - - logger.Info("Starting KAgent Controller", "version", Version, "git_commit", GitCommit, "build_date", BuildDate) - logger.Info("Config", "config", cfg) - ctrl.SetLogger(logger) - goruntime.SetMaxProcs(logger) + setupLog.Info("Starting KAgent Controller", "version", Version, "git_commit", GitCommit, "build_date", BuildDate, "config", cfg) - setupLog.Info("Starting KAgent Controller", "version", Version, "git_commit", GitCommit, "build_date", BuildDate) + goruntime.SetMaxProcs(logger) // if the enable-http2 flag is false (the default), http/2 should be disabled // due to its vulnerabilities. More specifically, disabling http/2 will diff --git a/helm/kagent/templates/controller-deployment.yaml b/helm/kagent/templates/controller-deployment.yaml index 4bf66a53e..2044c332f 100644 --- a/helm/kagent/templates/controller-deployment.yaml +++ b/helm/kagent/templates/controller-deployment.yaml @@ -91,8 +91,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: LOG_LEVEL - value: {{ .Values.controller.loglevel | quote }} - name: OTEL_TRACING_ENABLED value: {{ .Values.otel.tracing.enabled | quote }} - name: OTEL_EXPORTER_OTLP_ENDPOINT