2 # Global registry to pull the images from
4 # To help compatibility with other charts which use global.imagePullSecrets.
8## Override the deployment namespace
11# Force the target Kubernetes version (it uses Helm `.Capabilities` if not set).
12# This is especially useful for `helm template` as capabilities are always empty
13# due to the fact that it doesn't query an actual cluster
15# Oauth client configuration specifics
17 # Add config annotations
22 clientSecret: "XXXXXXXX"
23 # List of secret keys to include in the secret and expose as environment variables.
24 # By default, all three secrets are required. To exclude certain secrets
25 # (e.g., when using federated token authentication), remove them from this list.
26 # Example to exclude client-secret:
34 # Create a new secret with the following command
35 # openssl rand -base64 32 | head -c 32 | base64
36 # Use an existing secret for OAuth2 credentials (see secret.yaml for required fields)
38 # existingSecret: secret
39 cookieSecret: "XXXXXXXXXXXXXXXX"
40 # The name of the cookie that oauth2-proxy will create
41 # If left empty, it will default to the release name
45 # useApplicationDefaultCredentials: true
46 # targetPrincipal: xxxx
47 # serviceAccountJson: xxxx
48 # Alternatively, use an existing secret (see google-secret.yaml for required fields)
50 # existingSecret: google-secret
53 # - group1@example.com
54 # - group2@example.com
56 # Configuration file generation precedence
57 # 1. If configFile is set, it takes precedence over the structured
59 # 2. When alphaConfig.enabled=true and forceLegacyConfig=false,
60 # both configFile and existingConfig are ignored and the chart
61 # generates a minimal legacy config from emailDomains only.
62 # 3. If configFile is empty/not set, the config is auto-generated
63 # from emailDomains and, when alphaConfig is disabled, upstreams.
64 # 4. When alphaConfig.enabled=false and forceLegacyConfig=false,
65 # and neither config.configFile nor config.existingConfig are set,
66 # no ConfigMap is generated or mounted. Use this when you manage
67 # oauth2-proxy configuration entirely via external means (e.g.,
68 # CSI SecretStore Driver, extraVolumes, etc.).
70 # Email domains allowed to authenticate when the chart generates
71 # the main oauth2_proxy.cfg.
72 # This is always included in generated config, including the
73 # minimal alphaConfig-compatible legacy config.
75 # Legacy upstream configuration used only when the chart generates
76 # oauth2_proxy.cfg and alphaConfig is disabled.
77 # When alphaConfig.enabled is true, define upstreams in
78 # alphaConfig.configData.upstreamConfig instead.
79 upstreams: ["file:///dev/null"]
80 # Behavior when using alphaConfig together with a custom config file
82 # This flag has an effect when:
83 # - alphaConfig.enabled is true AND you provide a custom
84 # config.configFile or config.existingConfig, OR
85 # - alphaConfig.enabled is false AND no configFile/existingConfig
86 # is provided (setting forceLegacyConfig=false disables config
87 # generation entirely — see "no-config mode" below).
89 # Auto-generated config when alphaConfig.enabled=true is always a
90 # minimal legacy config (no upstreams), regardless of this flag.
92 # When true (default): Honor a custom configFile/existingConfig
93 # even when alphaConfig.enabled=true. If your custom config still
94 # contains deprecated options (for example 'upstreams'),
95 # oauth2-proxy may fail with:
96 # "failed to load core options: '' has invalid keys: upstreams"
98 # When false: Ignore any custom configFile/existingConfig when
99 # alphaConfig.enabled=true and instead generate the minimal
100 # legacy config. This preserves compatibility and avoids
101 # invalid legacy options such as 'upstreams'.
103 # If you are using alphaConfig and see the error:
104 # "failed to load core options: '' has invalid keys: upstreams"
105 # you have two options:
106 # 1) Keep forceLegacyConfig: true (default):
107 # - Continue using your custom legacy config, but ensure it
108 # is alpha-compatible (remove 'upstreams' and any other
109 # keys no longer supported).
110 # 2) Set forceLegacyConfig: false:
111 # - The chart will ignore config.configFile and
112 # config.existingConfig for alphaConfig.
113 # - Define upstreams in alphaConfig.configData.upstreamConfig
114 # instead (see examples below).
115 # - Move any other relevant settings into alphaConfig and/or
116 # flags rather than relying on a custom legacy configFile.
119 # If forceLegacyConfig and alphaConfig.enabled are both false,
120 # and no configFile or existingConfig is provided, no ConfigMap
121 # is generated or mounted. This is useful when managing config
122 # externally (e.g., CSI SecretStore Driver).
123 forceLegacyConfig: true
125 # Custom configuration file: oauth2_proxy.cfg (overrides
126 # emailDomains and upstreams when it is honored)
129 # email_domains = [ "*" ]
130 # pass_basic_auth = false
131 # pass_access_token = true
132 # Use an existing config map (see configmap.yaml for required fields)
133 # This is ignored when alphaConfig.enabled=true and
134 # forceLegacyConfig=false.
136 # existingConfig: config
140 # Add config annotations
142 # Arbitrary configuration data to append to the server section
144 # Arbitrary configuration data to append to the metrics section
145 metricsConfigData: {}
146 # Arbitrary configuration data to append
149 # Example: Multiple upstreams with path-based routing
155 # uri: http://service1:8080
157 # passHostHeader: true
158 # proxyWebSockets: true
161 # uri: http://service2:8081
162 # rewriteTarget: /v1/
163 # injectResponseHeaders:
164 # - name: X-Custom-Header
166 # - value: custom-value
167 # injectResponseHeaders:
168 # - name: X-Auth-Request-Email
172 # For more information on alpha config options, see:
173 # https://oauth2-proxy.github.io/oauth2-proxy/configuration/alpha-config
175 # Arbitrary configuration to append
176 # This is treated as a Go template and rendered with the root context
178 # Use an existing config map (see secret-alpha.yaml for required fields).
179 # Mutually exclusive with existingSecret and all generated alpha config
180 # content options (serverConfigData, metricsConfigData, configData, configFile).
182 # Use an existing secret.
183 # Mutually exclusive with existingConfig and all generated alpha config
184 # content options (serverConfigData, metricsConfigData, configData, configFile).
187 # NOTE: When using alphaConfig with external secrets (e.g., Azure
188 # Key Vault CSI Driver), you can inject secrets via the top-level
189 # extraEnv (see the extraEnv section below) instead of embedding
190 # them in the config:
193 # - name: OAUTH2_PROXY_CLIENT_ID
196 # name: external-secret
198 # - name: OAUTH2_PROXY_CLIENT_SECRET
201 # name: external-secret
205 repository: chainguard-private/oauth2-proxy
206 # appVersion is used by default
207 tag: latest@sha256:715c6df020f8bbea096e18c31d3633a9baa4f4068011648e3612c5cd32867973
208 pullPolicy: "IfNotPresent"
210# Optionally specify an array of imagePullSecrets.
211# Secrets must be manually created in the namespace.
212# ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
214# - name: myRegistryKeySecretName
216# Set a custom containerPort if required.
217# This will default to 4180 if this value is not set and the httpScheme set to http
218# This will default to 4443 if this value is not set and the httpScheme set to https
222# Example: Load secrets from an external secret (e.g., Azure Key
223# Vault via CSI Driver)
225# - name: OAUTH2_PROXY_CLIENT_ID
228# name: azure-keyvault-secret
230# - name: OAUTH2_PROXY_CLIENT_SECRET
233# name: azure-keyvault-secret
235# - name: OAUTH2_PROXY_COOKIE_SECRET
238# name: azure-keyvault-secret
242# Load environment variables from a ConfigMap(s) and/or Secret(s)
243# that already exists (created and managed by you).
244# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables
246# PS: Changes in these ConfigMaps or Secrets will not be automatically
247# detected and you must manually restart the relevant Pods after changes.
250# name: special-config
252# name: special-config-secret
254# -- Custom labels to add into metadata
256# To authorize individual email addresses
257# That is part of extraArgs but since this needs special treatment we need to do a separate section
258authenticatedEmailsFile:
260 # Defines how the email addresses file will be projected, via a configmap or secret
261 persistence: configmap
262 # template is the name of the configmap what contains the email user list but has been configured without this chart.
263 # It's a simpler way to maintain only one configmap (user list) instead changing it for each oauth2-proxy service.
264 # Be aware the value name in the extern config map in data needs to be named to "restricted_user_access" or to the
265 # provided value in restrictedUserAccessKey field.
267 # The configmap/secret key under which the list of email access is stored
268 # Defaults to "restricted_user_access" if not filled-in, but can be overridden to allow flexibility
269 restrictedUserAccessKey: ""
272 # restricted_access: |-
275 # If you override the config with restricted_access it will configure a user list within this chart what takes care of the
276 # config map resource.
277 restricted_access: ""
279 # helm.sh/resource-policy: keep
282 # when service.type is ClusterIP ...
283 # clusterIP: 192.0.2.20
284 # when service.type is LoadBalancer ...
285 # loadBalancerIP: 198.51.100.40
286 # loadBalancerSourceRanges: 203.0.113.0/24
287 # when service.type is NodePort ...
290 # Protocol set on the service
294 # configure externalTrafficPolicy
295 externalTrafficPolicy: ""
296 # configure internalTrafficPolicy
297 internalTrafficPolicy: ""
298 # configure service target port
300 # Configures the service to use IPv4/IPv6 dual-stack.
301 # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
304 ipFamilies: ["IPv6", "IPv4"]
305 ipFamilyPolicy: "PreferDualStack"
306 # Configure traffic distribution for the service
307 # Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution
308 trafficDistribution: ""
309## Create or use ServiceAccount
311 ## Specifies whether a ServiceAccount should be created
313 ## The name of the ServiceAccount to use.
314 ## If not set and create is true, a name is generated using the fullname template
316 automountServiceAccountToken: true
318 ## imagePullSecrets for the service account
320 # - name: myRegistryKeySecretName
321# Network policy settings.
330 # Only used if API capabilities (networking.k8s.io/v1) allow it
331 pathType: ImplementationSpecific
332 # Used to create an Ingress record.
334 # - chart-example.local
335 # Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
336 # Warning! The configuration is dependant on your current k8s API version capabilities (networking.k8s.io/v1)
339 # pathType: ImplementationSpecific
344 # name: use-annotation
347 # kubernetes.io/ingress.class: nginx
348 # kubernetes.io/tls-acme: "true"
350 # Secrets must be manually created in the namespace.
351 # - secretName: chart-example-tls
353 # - chart-example.local
354# Gateway API HTTPRoute configuration
355# Ref: https://gateway-api.sigs.k8s.io/api-types/httproute/
358 # The name of the Gateway resource to attach the HTTPRoute to
362 # namespace: gateway-system
363 # sectionName: my-gateway-https-listener-name
365 # https://gateway-api.sigs.k8s.io/reference/spec/#parentreference
367 # HTTPRoute rule configuration
369 # - name: service # optional: enables targeting by sectionName in policies
375 # Hostnames to match in the HTTPRoute
377 # - chart-example.local
379 # Additional labels to add to the HTTPRoute
381 # Additional annotations to add to the HTTPRoute
391# Container resize policy for runtime resource updates
392# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/
395# restartPolicy: NotRequired
396# - resourceName: memory
397# restartPolicy: RestartContainer
400# - name: ca-bundle-cert
402# secretName: <secret-name>
405# - mountPath: /etc/ssl/certs/
406# name: ca-bundle-cert
408# Additional containers to be added to the pod.
413# Additional Init containers to be added to the pod.
414extraInitContainers: []
415# - name: wait-for-idp
416# image: my-idp-wait:latest
423# hostAliases is a list of aliases to be added to /etc/hosts for network name resolution
425# - ip: "10.xxx.xxx.xxx"
427# - "auth.example.com"
430# - chart-example.local
433# [TopologySpreadConstraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) configuration.
434# Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling
435# topologySpreadConstraints: []
437# Affinity for pod assignment
438# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
441# Tolerations for pod assignment
442# Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
444# Node labels for pod assignment
445# Ref: https://kubernetes.io/docs/user-guide/node-selection/
447# Whether to use secrets instead of environment values for setting up OAUTH2_PROXY variables
448proxyVarsAsSecrets: true
449# Configure Kubernetes liveness and readiness probes.
450# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
451# Disable both when deploying with Istio 1.0 mTLS. https://istio.io/help/faq/security/#k8s-health-checks
454 initialDelaySeconds: 0
458 initialDelaySeconds: 0
462# Configure Kubernetes security context for container
463# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
466 allowPrivilegeEscalation: false
470 readOnlyRootFilesystem: true
477deploymentAnnotations: {}
481revisionHistoryLimit: 10
483enableServiceLinks: true
484## PodDisruptionBudget settings
485## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
486## One of maxUnavailable and minAvailable must be set to null.
491 # Policy for when unhealthy pods should be considered for eviction.
492 # Valid values are "IfHealthyBudget" and "AlwaysAllow".
493 # Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy
494 unhealthyPodEvictionPolicy: ""
495## Horizontal Pod Autoscaling
496## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
501 targetCPUUtilizationPercentage: 80
502 # targetMemoryUtilizationPercentage: 80
504 # Configure HPA behavior policies for scaling if needed
505 # Ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#configuring-scaling-behavior
508 # stabilizationWindowSeconds: 300
515 # stabilizationWindowSeconds: 0
524# Configure Kubernetes security context for pod
525# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
526podSecurityContext: {}
527# whether to use http or https
530 # if the redis sub-chart is enabled, wait for it to be ready
531 # before starting the proxy
532 # creates a role binding to get, list, watch, the redis master pod
533 # if service account is enabled
537 repository: cgr.dev/chainguard-private/chainguard-base
538 tag: latest@sha256:1e3516fab5d8e4995b8efc648a5b09943a180b0d9caf77c7b29f7df662c91ab3
539 pullPolicy: "IfNotPresent"
540 # uses the kubernetes version of the cluster
541 # the chart is deployed on, if not set
545 allowPrivilegeEscalation: false
549 readOnlyRootFilesystem: true
563# Additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -B" for bcrypt encryption.
564# Alternatively supply an existing secret which contains the required information.
569 # One row for each user
572 # - testuser:$2y$05$gY6dgXqjuzFhwdhsiFe7seM9q9Tile4Y3E.CBpAZJffkeiLaC21Gy
573# Configure the session storage type, between cookie and redis
575 # Can be one of the supported session storage cookie|redis
578 # Name of the Kubernetes secret containing the redis & redis sentinel password values (see also `sessionStorage.redis.passwordKey`)
580 # Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence
582 # Key of the Kubernetes secret data containing the redis password value. If you use the redis sub chart, make sure
583 # this password matches the one used in redis-ha.redisPassword (see below).
584 passwordKey: "redis-password"
585 # Can be one of standalone|cluster|sentinel
586 clientType: "standalone"
588 # URL of redis standalone server for redis session storage (e.g. `redis://HOST[:PORT]`). Automatically generated if not set
591 # List of Redis cluster connection URLs. Array or single string allowed.
593 # - "redis://127.0.0.1:8000"
594 # - "redis://127.0.0.1:8001"
596 # Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
598 # Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password`
600 # Key of the Kubernetes secret data containing the redis sentinel password value
601 passwordKey: "redis-sentinel-password"
602 # Redis sentinel master name
604 # List of Redis cluster connection URLs. Array or single string allowed.
606 # - "redis://127.0.0.1:8000"
607 # - "redis://127.0.0.1:8001"
608# Enables and configure the automatic deployment of the redis-ha subchart
610 # provision an instance of the redis-ha sub-chart
612 # Redis specific helm chart settings, please see:
613 # https://artifacthub.io/packages/helm/dandydev-charts/redis-ha#general-parameters
617 # redisPassword: xxxxx
620 # IMPORTANT: When using a single replica (replicas: 1), you MUST also configure
621 # min-replicas-to-write to 0 to avoid "NOREPLICAS Not enough good replicas to write" errors.
622 # See: https://stackoverflow.com/a/59737862
625 # min-replicas-to-write: 0
630 # If you install Redis using this sub chart, make sure that the password of the sub chart matches the password
631 # you set in sessionStorage.redis.password (see above).
633 # If you want to use redis in sentinel mode see:
634 # https://artifacthub.io/packages/helm/dandydev-charts/redis-ha#redis-sentinel-parameters
635# Enables apiVersion deprecation checks
636checkDeprecation: true
637# Allows graceful shutdown
638# terminationGracePeriodSeconds: 65
642# command: [ "sh", "-c", "sleep 60" ]
644 # Enable Prometheus metrics endpoint
646 # Serve Prometheus metrics on this port
648 # when service.type is NodePort ...
650 # Protocol set on the service for the metrics port
654 # Enable Prometheus Operator ServiceMonitor
656 # Define the namespace where to deploy the ServiceMonitor resource
658 # Prometheus Instance definition
659 prometheusInstance: default
660 # Prometheus scrape interval
662 # Prometheus scrape timeout
664 # Add custom labels to the ServiceMonitor resource
666 ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS.
668 ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS.
669 ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig
671 ## bearerTokenFile: Path to bearer token file.
673 ## Used to pass annotations that are used by the Prometheus installed in your cluster to select Service Monitors to work with
674 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
676 ## Metric relabel configs to apply to samples before ingestion.
677 ## [Metric Relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs)
678 metricRelabelings: []
680 # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
681 # sourceLabels: [__name__]
683 ## Relabel configs to apply to samples before ingestion.
684 ## [Relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config)
686 # - sourceLabels: [__meta_kubernetes_pod_node_name]
689 # targetLabel: nodename
692# Extra K8s manifests to deploy
694# - apiVersion: secrets-store.csi.x-k8s.io/v1
695# kind: SecretProviderClass
697# name: oauth2-proxy-secrets-store
702# - objectName: "oauth2-proxy"
703# objectType: "secretsmanager"
706# objectAlias: "client-id"
707# - path: "client_secret"
708# objectAlias: "client-secret"
709# - path: "cookie_secret"
710# objectAlias: "cookie-secret"
714# objectName: client-id
715# - key: client-secret
716# objectName: client-secret
717# - key: cookie-secret
718# objectName: cookie-secret
719# secretName: oauth2-proxy-secrets-store