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.
65 # Email domains allowed to authenticate when the chart generates
66 # the main oauth2_proxy.cfg.
67 # This is always included in generated config, including the
68 # minimal alphaConfig-compatible legacy config.
70 # Legacy upstream configuration used only when the chart generates
71 # oauth2_proxy.cfg and alphaConfig is disabled.
72 # When alphaConfig.enabled is true, define upstreams in
73 # alphaConfig.configData.upstreamConfig instead.
74 upstreams: ["file:///dev/null"]
75 # Behavior when using alphaConfig together with a custom config file
77 # This flag only has an effect when:
78 # - alphaConfig.enabled is true, AND
79 # - you provide a custom config.configFile or config.existingConfig.
81 # Auto-generated config when alphaConfig.enabled=true is always a
82 # minimal legacy config (no upstreams), regardless of this flag.
84 # When true (default): Honor a custom configFile/existingConfig
85 # even when alphaConfig.enabled=true. If your custom config still
86 # contains deprecated options (for example 'upstreams'),
87 # oauth2-proxy may fail with:
88 # "failed to load core options: '' has invalid keys: upstreams"
90 # When false: Ignore any custom configFile/existingConfig when
91 # alphaConfig.enabled=true and instead generate the minimal
92 # legacy config. This preserves compatibility and avoids
93 # invalid legacy options such as 'upstreams'.
95 # If you are using alphaConfig and see the error:
96 # "failed to load core options: '' has invalid keys: upstreams"
97 # you have two options:
98 # 1) Keep forceLegacyConfig: true (default):
99 # - Continue using your custom legacy config, but ensure it
100 # is alpha-compatible (remove 'upstreams' and any other
101 # keys no longer supported).
102 # 2) Set forceLegacyConfig: false:
103 # - The chart will ignore config.configFile and
104 # config.existingConfig for alphaConfig.
105 # - Define upstreams in alphaConfig.configData.upstreamConfig
106 # instead (see examples below).
107 # - Move any other relevant settings into alphaConfig and/or
108 # flags rather than relying on a custom legacy configFile.
109 forceLegacyConfig: true
111 # Custom configuration file: oauth2_proxy.cfg (overrides
112 # emailDomains and upstreams when it is honored)
115 # email_domains = [ "*" ]
116 # pass_basic_auth = false
117 # pass_access_token = true
118 # Use an existing config map (see configmap.yaml for required fields)
119 # This is ignored when alphaConfig.enabled=true and
120 # forceLegacyConfig=false.
122 # existingConfig: config
126 # Add config annotations
128 # Arbitrary configuration data to append to the server section
130 # Arbitrary configuration data to append to the metrics section
131 metricsConfigData: {}
132 # Arbitrary configuration data to append
135 # Example: Multiple upstreams with path-based routing
141 # uri: http://service1:8080
143 # passHostHeader: true
144 # proxyWebSockets: true
147 # uri: http://service2:8081
148 # rewriteTarget: /v1/
149 # injectResponseHeaders:
150 # - name: X-Custom-Header
152 # - value: custom-value
153 # injectResponseHeaders:
154 # - name: X-Auth-Request-Email
158 # For more information on alpha config options, see:
159 # https://oauth2-proxy.github.io/oauth2-proxy/configuration/alpha-config
161 # Arbitrary configuration to append
162 # This is treated as a Go template and rendered with the root context
164 # Use an existing config map (see secret-alpha.yaml for required fields)
166 # Use an existing secret
169 # NOTE: When using alphaConfig with external secrets (e.g., Azure
170 # Key Vault CSI Driver), you can inject secrets via the top-level
171 # extraEnv (see the extraEnv section below) instead of embedding
172 # them in the config:
175 # - name: OAUTH2_PROXY_CLIENT_ID
178 # name: external-secret
180 # - name: OAUTH2_PROXY_CLIENT_SECRET
183 # name: external-secret
187 repository: chainguard-private/oauth2-proxy
188 # appVersion is used by default
189 tag: latest@sha256:0175f2aeabaebdb55b4675a5197ba379c655074958933c2427849ee6b777b63a
190 pullPolicy: "IfNotPresent"
192# Optionally specify an array of imagePullSecrets.
193# Secrets must be manually created in the namespace.
194# ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
196# - name: myRegistryKeySecretName
198# Set a custom containerPort if required.
199# This will default to 4180 if this value is not set and the httpScheme set to http
200# This will default to 4443 if this value is not set and the httpScheme set to https
204# Example: Load secrets from an external secret (e.g., Azure Key
205# Vault via CSI Driver)
207# - name: OAUTH2_PROXY_CLIENT_ID
210# name: azure-keyvault-secret
212# - name: OAUTH2_PROXY_CLIENT_SECRET
215# name: azure-keyvault-secret
217# - name: OAUTH2_PROXY_COOKIE_SECRET
220# name: azure-keyvault-secret
224# Load environment variables from a ConfigMap(s) and/or Secret(s)
225# that already exists (created and managed by you).
226# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables
228# PS: Changes in these ConfigMaps or Secrets will not be automatically
229# detected and you must manually restart the relevant Pods after changes.
232# name: special-config
234# name: special-config-secret
236# -- Custom labels to add into metadata
238# To authorize individual email addresses
239# That is part of extraArgs but since this needs special treatment we need to do a separate section
240authenticatedEmailsFile:
242 # Defines how the email addresses file will be projected, via a configmap or secret
243 persistence: configmap
244 # template is the name of the configmap what contains the email user list but has been configured without this chart.
245 # It's a simpler way to maintain only one configmap (user list) instead changing it for each oauth2-proxy service.
246 # Be aware the value name in the extern config map in data needs to be named to "restricted_user_access" or to the
247 # provided value in restrictedUserAccessKey field.
249 # The configmap/secret key under which the list of email access is stored
250 # Defaults to "restricted_user_access" if not filled-in, but can be overridden to allow flexibility
251 restrictedUserAccessKey: ""
254 # restricted_access: |-
257 # If you override the config with restricted_access it will configure a user list within this chart what takes care of the
258 # config map resource.
259 restricted_access: ""
261 # helm.sh/resource-policy: keep
264 # when service.type is ClusterIP ...
265 # clusterIP: 192.0.2.20
266 # when service.type is LoadBalancer ...
267 # loadBalancerIP: 198.51.100.40
268 # loadBalancerSourceRanges: 203.0.113.0/24
269 # when service.type is NodePort ...
272 # Protocol set on the service
276 # configure externalTrafficPolicy
277 externalTrafficPolicy: ""
278 # configure internalTrafficPolicy
279 internalTrafficPolicy: ""
280 # configure service target port
282 # Configures the service to use IPv4/IPv6 dual-stack.
283 # Ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
286 ipFamilies: ["IPv6", "IPv4"]
287 ipFamilyPolicy: "PreferDualStack"
288 # Configure traffic distribution for the service
289 # Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution
290 trafficDistribution: ""
291## Create or use ServiceAccount
293 ## Specifies whether a ServiceAccount should be created
295 ## The name of the ServiceAccount to use.
296 ## If not set and create is true, a name is generated using the fullname template
298 automountServiceAccountToken: true
300 ## imagePullSecrets for the service account
302 # - name: myRegistryKeySecretName
303# Network policy settings.
312 # Only used if API capabilities (networking.k8s.io/v1) allow it
313 pathType: ImplementationSpecific
314 # Used to create an Ingress record.
316 # - chart-example.local
317 # Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
318 # Warning! The configuration is dependant on your current k8s API version capabilities (networking.k8s.io/v1)
321 # pathType: ImplementationSpecific
326 # name: use-annotation
329 # kubernetes.io/ingress.class: nginx
330 # kubernetes.io/tls-acme: "true"
332 # Secrets must be manually created in the namespace.
333 # - secretName: chart-example-tls
335 # - chart-example.local
336# Gateway API HTTPRoute configuration
337# Ref: https://gateway-api.sigs.k8s.io/api-types/httproute/
340 # The name of the Gateway resource to attach the HTTPRoute to
344 # namespace: gateway-system
345 # sectionName: my-gateway-https-listener-name
347 # https://gateway-api.sigs.k8s.io/reference/spec/#parentreference
349 # HTTPRoute rule configuration
356 # Hostnames to match in the HTTPRoute
358 # - chart-example.local
360 # Additional labels to add to the HTTPRoute
362 # Additional annotations to add to the HTTPRoute
372# Container resize policy for runtime resource updates
373# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/
376# restartPolicy: NotRequired
377# - resourceName: memory
378# restartPolicy: RestartContainer
381# - name: ca-bundle-cert
383# secretName: <secret-name>
386# - mountPath: /etc/ssl/certs/
387# name: ca-bundle-cert
389# Additional containers to be added to the pod.
394# Additional Init containers to be added to the pod.
395extraInitContainers: []
396# - name: wait-for-idp
397# image: my-idp-wait:latest
404# hostAliases is a list of aliases to be added to /etc/hosts for network name resolution
406# - ip: "10.xxx.xxx.xxx"
408# - "auth.example.com"
411# - chart-example.local
414# [TopologySpreadConstraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) configuration.
415# Ref: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling
416# topologySpreadConstraints: []
418# Affinity for pod assignment
419# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
422# Tolerations for pod assignment
423# Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
425# Node labels for pod assignment
426# Ref: https://kubernetes.io/docs/user-guide/node-selection/
428# Whether to use secrets instead of environment values for setting up OAUTH2_PROXY variables
429proxyVarsAsSecrets: true
430# Configure Kubernetes liveness and readiness probes.
431# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
432# Disable both when deploying with Istio 1.0 mTLS. https://istio.io/help/faq/security/#k8s-health-checks
435 initialDelaySeconds: 0
439 initialDelaySeconds: 0
443# Configure Kubernetes security context for container
444# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
447 allowPrivilegeEscalation: false
451 readOnlyRootFilesystem: true
457deploymentAnnotations: {}
461revisionHistoryLimit: 10
463enableServiceLinks: true
464## PodDisruptionBudget settings
465## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
466## One of maxUnavailable and minAvailable must be set to null.
471 # Policy for when unhealthy pods should be considered for eviction.
472 # Valid values are "IfHealthyBudget" and "AlwaysAllow".
473 # Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy
474 unhealthyPodEvictionPolicy: ""
475## Horizontal Pod Autoscaling
476## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
481 targetCPUUtilizationPercentage: 80
482 # targetMemoryUtilizationPercentage: 80
484 # Configure HPA behavior policies for scaling if needed
485 # Ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#configuring-scaling-behavior
488 # stabilizationWindowSeconds: 300
495 # stabilizationWindowSeconds: 0
504# Configure Kubernetes security context for pod
505# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
506podSecurityContext: {}
507# whether to use http or https
510 # if the redis sub-chart is enabled, wait for it to be ready
511 # before starting the proxy
512 # creates a role binding to get, list, watch, the redis master pod
513 # if service account is enabled
517 repository: cgr.dev/chainguard-private/chainguard-base
518 tag: latest@sha256:1bed6b473b5e86693a9aafa4bdbd9f9cbb6df5e26ff7f168880316a90bb66cf9
519 pullPolicy: "IfNotPresent"
520 # uses the kubernetes version of the cluster
521 # the chart is deployed on, if not set
525 allowPrivilegeEscalation: false
529 readOnlyRootFilesystem: true
543# Additionally authenticate against a htpasswd file. Entries must be created with "htpasswd -B" for bcrypt encryption.
544# Alternatively supply an existing secret which contains the required information.
549 # One row for each user
552 # - testuser:$2y$05$gY6dgXqjuzFhwdhsiFe7seM9q9Tile4Y3E.CBpAZJffkeiLaC21Gy
553# Configure the session storage type, between cookie and redis
555 # Can be one of the supported session storage cookie|redis
558 # Name of the Kubernetes secret containing the redis & redis sentinel password values (see also `sessionStorage.redis.passwordKey`)
560 # Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence
562 # Key of the Kubernetes secret data containing the redis password value. If you use the redis sub chart, make sure
563 # this password matches the one used in redis-ha.redisPassword (see below).
564 passwordKey: "redis-password"
565 # Can be one of standalone|cluster|sentinel
566 clientType: "standalone"
568 # URL of redis standalone server for redis session storage (e.g. `redis://HOST[:PORT]`). Automatically generated if not set
571 # List of Redis cluster connection URLs. Array or single string allowed.
573 # - "redis://127.0.0.1:8000"
574 # - "redis://127.0.0.1:8001"
576 # Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
578 # Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password`
580 # Key of the Kubernetes secret data containing the redis sentinel password value
581 passwordKey: "redis-sentinel-password"
582 # Redis sentinel master name
584 # List of Redis cluster connection URLs. Array or single string allowed.
586 # - "redis://127.0.0.1:8000"
587 # - "redis://127.0.0.1:8001"
588# Enables and configure the automatic deployment of the redis-ha subchart
590 # provision an instance of the redis-ha sub-chart
592 # Redis specific helm chart settings, please see:
593 # https://artifacthub.io/packages/helm/dandydev-charts/redis-ha#general-parameters
597 # redisPassword: xxxxx
600 # IMPORTANT: When using a single replica (replicas: 1), you MUST also configure
601 # min-replicas-to-write to 0 to avoid "NOREPLICAS Not enough good replicas to write" errors.
602 # See: https://stackoverflow.com/a/59737862
605 # min-replicas-to-write: 0
610 # If you install Redis using this sub chart, make sure that the password of the sub chart matches the password
611 # you set in sessionStorage.redis.password (see above).
613 # If you want to use redis in sentinel mode see:
614 # https://artifacthub.io/packages/helm/dandydev-charts/redis-ha#redis-sentinel-parameters
615# Enables apiVersion deprecation checks
616checkDeprecation: true
617# Allows graceful shutdown
618# terminationGracePeriodSeconds: 65
622# command: [ "sh", "-c", "sleep 60" ]
624 # Enable Prometheus metrics endpoint
626 # Serve Prometheus metrics on this port
628 # when service.type is NodePort ...
630 # Protocol set on the service for the metrics port
634 # Enable Prometheus Operator ServiceMonitor
636 # Define the namespace where to deploy the ServiceMonitor resource
638 # Prometheus Instance definition
639 prometheusInstance: default
640 # Prometheus scrape interval
642 # Prometheus scrape timeout
644 # Add custom labels to the ServiceMonitor resource
646 ## scheme: HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS.
648 ## tlsConfig: TLS configuration to use when scraping the endpoint. For example if using istio mTLS.
649 ## Of type: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig
651 ## bearerTokenFile: Path to bearer token file.
653 ## Used to pass annotations that are used by the Prometheus installed in your cluster to select Service Monitors to work with
654 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
656 ## Metric relabel configs to apply to samples before ingestion.
657 ## [Metric Relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs)
658 metricRelabelings: []
660 # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
661 # sourceLabels: [__name__]
663 ## Relabel configs to apply to samples before ingestion.
664 ## [Relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config)
666 # - sourceLabels: [__meta_kubernetes_pod_node_name]
669 # targetLabel: nodename
672# Extra K8s manifests to deploy
674# - apiVersion: secrets-store.csi.x-k8s.io/v1
675# kind: SecretProviderClass
677# name: oauth2-proxy-secrets-store
682# - objectName: "oauth2-proxy"
683# objectType: "secretsmanager"
686# objectAlias: "client-id"
687# - path: "client_secret"
688# objectAlias: "client-secret"
689# - path: "cookie_secret"
690# objectAlias: "cookie-secret"
694# objectName: client-id
695# - key: client-secret
696# objectName: client-secret
697# - key: cookie-secret
698# objectName: cookie-secret
699# secretName: oauth2-proxy-secrets-store