Back to Charts

⚠️ Repo Archive Notice

stable/oauth2-proxy/README.md

latest9.1 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

oauth2-proxy

oauth2-proxy is a reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others) to validate accounts by email, domain or group.

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

TL;DR;

console
$ helm install stable/oauth2-proxy

Introduction

This chart bootstraps an oauth2-proxy deployment on a Kubernetes cluster using the Helm package manager.

Installing the Chart

To install the chart with the release name my-release:

console
$ helm install stable/oauth2-proxy --name my-release

The command deploys oauth2-proxy on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

console
$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

To 1.0.0

This version upgrade oauth2-proxy to v4.0.0. Please see the changelog in order to upgrade.

To 2.0.0

Version 2.0.0 of this chart introduces support for Kubernetes v1.16.x by way of addressing the deprecation of the Deployment object apiVersion apps/v1beta2. See the v1.16 API deprecations page for more information.

Due to this issue there may be errors performing a helm upgradeof this chart from versions earlier than 2.0.0.

To 3.0.0

Version 3.0.0 introduces support for EKS IAM roles for service accounts by adding a managed service account to the chart. This is a breaking change since the service account is enabled by default. To disable this behaviour set serviceAccount.enabled to false

Configuration

The following table lists the configurable parameters of the oauth2-proxy chart and their default values.

ParameterDescriptionDefault
affinitynode/pod affinitiesNone
authenticatedEmailsFile.enabledEnables authorize individual email addressesfalse
authenticatedEmailsFile.templateName of the configmap that is handled outside of that chart""
authenticatedEmailsFile.restricted_accessemail addresses list config""
config.clientIDoauth client ID""
config.clientSecretoauth client secret""
config.cookieSecretserver specific cookie for the secret; create a new one with `openssl rand -base64 32head -c 32
config.existingSecretexisting Kubernetes secret to use for OAuth2 credentials. See secret template for the required valuesnil
config.configFilecustom oauth2_proxy.cfg contents for settings not overridable via environment nor command line""
config.existingConfigexisting Kubernetes configmap to use for the configuration file. See config template for the required valuesnil
config.google.adminEmailuser impersonated by the google service account""
config.google.serviceAccountJsongoogle service account json contents""
config.google.existingConfigexisting Kubernetes configmap to use for the service account file. See google secret template for the required valuesnil
extraArgskey:value list of extra arguments to give the binary{}
extraEnvkey:value list of extra environment variables to give the binary[]
extraVolumeslist of extra volumes[]
extraVolumeMountslist of extra volumeMounts[]
htpasswdFile.enabledenable htpasswd-file optionfalse
htpasswdFile.entrieslist of SHA encrypted user:passwords{}
htpasswdFile.existingSecretexisting Kubernetes secret to use for OAuth2 htpasswd file""
httpSchemehttp or https. name used for port on the deployment. httpGet port name and scheme used for liveness- and readinessProbes. name and targetPort used for the service.http
image.pullPolicyImage pull policyIfNotPresent
image.repositoryImage repositoryquay.io/pusher/oauth2_proxy
image.tagImage tagv5.1.0
imagePullSecretsSpecify image pull secretsnil (does not add image pull secrets to deployed pods)
ingress.enabledEnable Ingressfalse
ingress.pathIngress accepted path/
ingress.extraPathsIngress extra paths to prepend to every host configuration. Useful when configuring custom actions with AWS ALB Ingress Controller.[]
ingress.annotationsIngress annotationsnil
ingress.hostsIngress accepted hostnamesnil
ingress.tlsIngress TLS configurationnil
livenessProbe.enabledenable Kubernetes livenessProbe. Disable to use oauth2-proxy with Istio mTLS. See Istio FAQtrue
livenessProbe.initialDelaySecondsnumber of seconds0
livenessProbe.timeoutSecondsnumber of seconds1
nodeSelectornode labels for pod assignment{}
podAnnotationsannotations to add to each pod{}
podLabelsadditional labesl to add to each pod{}
podDisruptionBudget.enabledEnabled creation of PodDisruptionBudget (only if replicaCount > 1)true
podDisruptionBudget.minAvailableminAvailable parameter for PodDisruptionBudget1
podSecurityContextKubernetes security context to apply to pod{}
priorityClassNamepriorityClassNamenil
readinessProbe.enabledenable Kubernetes readinessProbe. Disable to use oauth2-proxy with Istio mTLS. See Istio FAQtrue
readinessProbe.initialDelaySecondsnumber of seconds0
readinessProbe.timeoutSecondsnumber of seconds1
readinessProbe.periodSecondsnumber of seconds10
readinessProbe.successThresholdnumber of successes1
replicaCountdesired number of pods1
resourcespod resource requests & limits{}
service.portport for the service80
service.typetype of serviceClusterIP
service.clusterIPcluster ip addressnil
service.loadBalancerIPip of load balancernil
service.loadBalancerSourceRangesallowed source ranges in load balancernil
serviceAccount.enabledcreate a service accounttrue
serviceAccount.namethe service account name``
serviceAccount.annotations(optional) annotations for the service account{}
tolerationslist of node taints to tolerate[]
securityContext.enabledenable Kubernetes security context on containerfalse
securityContext.runAsNonRootmake sure that the container runs as a non-root usertrue
proxyVarsAsSecretschoose between environment values or secrets for setting up OAUTH2_PROXY variables. When set to false, remember to add the variables OAUTH2_PROXY_CLIENT_ID, OAUTH2_PROXY_CLIENT_SECRET, OAUTH2_PROXY_COOKIE_SECRET in extraEnvtrue

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

console
$ helm install stable/oauth2-proxy --name my-release \
  --set=image.tag=v0.0.2,resources.limits.cpu=200m

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

console
$ helm install stable/oauth2-proxy --name my-release -f values.yaml

Tip: You can use the default values.yaml

SSL Configuration

See: SSL Configuration. Use values.yaml like:

yaml
...
extraArgs:
  tls-cert: /path/to/cert.pem
  tls-key: /path/to/cert.key

extraVolumes:
  - name: ssl-cert
    secret:
      secretName: my-ssl-secret

extraVolumeMounts:
  - mountPath: /path/to/
    name: ssl-cert
...

With a secret called my-ssl-secret:

yaml
...
data:
  cert.pem: AB..==
  cert.key: CD..==