Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

The operator is configured primarily through command-line flags (set by the Helm chart). A few environment variables are injected or read at runtime.

Operator Settings

VariableDescriptionDefault
POD_NAMESPACENamespace where the operator is runningInjected by Kubernetes
POD_NAMEName of the operator podInjected by Kubernetes

Logging

Logging is configured with zap flags, not environment variables. Via Helm:

logging:
  level: info       # debug, info, error
  format: json      # json, console
  development: false

Or locally:

go run ./cmd --zap-log-level=debug --zap-encoder=console --zap-devel

OpenTelemetry

OTLP export is enabled when an endpoint is set. See Monitoring.

VariableDescription
OTEL_EXPORTER_OTLP_ENDPOINTCollector endpoint (enables traces and logs)
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTOverride for traces only
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTOverride for logs only
OTEL_EXPORTER_OTLP_PROTOCOLgrpc (default via Helm) or http/protobuf
OTEL_SERVICE_NAMEDefaults to keycloak-operator when using the Helm chart
OTEL_TRACES_SAMPLERSDK sampler, e.g. parentbased_traceidratio
OTEL_RESOURCE_ATTRIBUTESExtra resource attributes

Any other standard OTEL_* variable is passed through to the SDK. Use Helm extraEnv for settings not covered by otel.*.