/

Runtime configuration

Runtime flags and environment variables supported by akv2k8s components


Most installations configure akv2k8s through the Helm chart. The options below are component runtime flags or environment variables that may be useful when troubleshooting or when mapping Helm values to the running pods.

Controller

OptionDefaultDescription
--watch-all-namespacestrueWatch AzureKeyVaultSecret resources in all namespaces. Set to false to watch only the controller runtime namespace.
--kube-resync-period30Kubernetes informer resync period in seconds.
--azure-resync-period30Azure Key Vault resync period in seconds.
AUTH_TYPEazureCloudConfigKey Vault authentication mode. Supported values include azureCloudConfig, environment, and environment-azidentity.
OBJECT_LABELSemptyLabel selector used to make a controller handle only matching AzureKeyVaultSecret objects.
METRICS_ENABLEDfalseEnables the controller /metrics endpoint.
HTTP_PORT9000Port for health and metrics endpoints.

Env-Injector Webhook

OptionDefaultDescription
AUTH_TYPEcloudConfigKey Vault authentication mode. Supported values include azureCloudConfig, environment, and environment-azidentity.
USE_AUTH_SERVICEtrueEnables the auth service used by injected application containers.
METRICS_ENABLEDfalseEnables webhook metrics.
AZUREKEYVAULT_ENV_IMAGEspvest/azure-keyvault-env:latestImage used by the init container that copies the env executable.
WEBHOOK_CONTAINER_IMAGE_PULL_POLICYIfNotPresentPull policy for the env executable init container.
WEBHOOK_INIT_CONTAINER_REQUESTS_CPU5mCPU request for the env executable init container.
WEBHOOK_INIT_CONTAINER_REQUESTS_MEMORY32MiMemory request for the env executable init container.
WEBHOOK_INIT_CONTAINER_LIMITS_MEMORY32MiMemory limit for the env executable init container.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_READ_ONLYfalseSets readOnlyRootFilesystem on the env executable init container.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_NON_ROOTfalseSets runAsNonRoot on the env executable init container.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_PRIVILEGEDtrueSets privileged on the env executable init container.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_ALLOW_PRIVILEGE_ESCALATIONunsetSets allowPrivilegeEscalation on the env executable init container when provided.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_USER_UIDunsetSets runAsUser on the env executable init container when provided.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_GROUP_GIDunsetSets runAsGroup on the env executable init container when provided.
WEBHOOK_CONTAINER_SECURITY_CONTEXT_SECCOMP_RUNTIME_DEFAULTunsetSets a RuntimeDefault seccomp profile on the env executable init container when true.

Injected Application Containers

OptionDefaultDescription
ENV_INJECTOR_DISABLE_AUTH_SERVICEfalseSet to true on a specific application container to disable auth service use for that container only.
ENV_INJECTOR_LOG_LEVELinfoLog level for the env executable running inside the application container.
ENV_INJECTOR_LOG_FORMATfmtLog format for the env executable.
ENV_INJECTOR_RETRIES3Number of retry attempts when fetching secrets.
ENV_INJECTOR_WAIT_BEFORE_RETRY3Seconds to wait between retry attempts.

ENV_INJECTOR_DISABLE_AUTH_SERVICE is useful when the Env-Injector auth service is enabled globally, but one workload should authenticate directly with its own Azure identity or environment-based credentials.

Edit on GitHub