oauth2-proxy

by [riftbit]

Helm chartv1.0.1App 7.1.3Verified publisher

A reverse proxy and static file server that provides authentication using different providers

About this chart

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.

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/oauth2-proxy

Introduction

Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.

This chart bootstraps a OAuth2 Proxy Deployment in a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.1.0
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

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

helm install my-release bitnami/oauth2-proxys

The command deploys OAuth2 Proxy on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

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

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
clusterDomainKubernetes cluster domain namecluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

Traffic Exposure Parameters

NameDescriptionValue
service.typeOAuth2 Proxy service typeClusterIP
service.portOAuth2 Proxy service HTTP port80
service.nodePorts.httpNode port for HTTP""
service.clusterIPOAuth2 Proxy service Cluster IP""
service.loadBalancerIPOAuth2 Proxy service Load Balancer IP""
service.loadBalancerSourceRangesOAuth2 Proxy service Load Balancer sources[]
service.externalTrafficPolicyOAuth2 Proxy service external traffic policyCluster
service.annotationsAdditional custom annotations for OAuth2 Proxy service{}
ingress.enabledEnable ingress record generation for WordPressfalse
ingress.certManagerAdd the corresponding annotations for cert-manager integrationfalse
ingress.pathTypeIngress path typeImplementationSpecific
ingress.apiVersionForce Ingress API version (automatically detected if not set)""
ingress.hostnameDefault host for the ingress recordoaut2-proxy.local
ingress.pathDefault path for the ingress record/
ingress.annotationsAdditional custom annotations for the ingress record{}
ingress.tlsEnable TLS configuration for the host defined at ingress.hostname parameterfalse
ingress.extraHostsAn array with additional hostname(s) to be covered with the ingress record[]
ingress.extraPathsAn array with additional arbitrary paths that may need to be added to the ingress under the main host[]
ingress.extraTlsTLS configuration for additional hostname(s) to be covered with this ingress record[]

OAuth2 Proxy Image parameters

NameDescriptionValue
image.registryOAuth2 Proxy image registrydocker.io
image.repositoryOAuth2 Proxy image repositorybitnami/oauth2-proxy
image.tagOAuth2 Proxy image tag (immutable tags are recommended)7.1.3-debian-10-r129
image.pullPolicyOAuth2 Proxy image pull policyIfNotPresent
image.pullSecretsOAuth2 Proxy image pull secrets[]

OAuth2 Proxy configuration parameters

NameDescriptionValue
configuration.clientIDOAuth client IDXXXXXXX
configuration.clientSecretOAuth client secretXXXXXXXX
configuration.cookieSecretOAuth cookie secretXXXXXXXXXXXXXXXX
configuration.existingSecretSecret with the client ID, secret and cookie secret""
configuration.google.enabledEnable Google service accountfalse
configuration.google.adminEmailGoogle admin email""
configuration.google.serviceAccountJsonGoogle Service account JSON""
configuration.google.existingSecretExisting secret containing Google Service Account""
configuration.contentDefault configuration""
configuration.existingConfigmapConfigmap with the OAuth2 Proxy configuration""
configuration.authenticatedEmailsFile.enabledEnable authenticated emails filefalse
configuration.authenticatedEmailsFile.contentRestricted access list (one email per line)""
configuration.authenticatedEmailsFile.existingSecretSecret with the authenticated emails file""
configuration.htpasswdFile.enabledEnable htpasswd filefalse
configuration.htpasswdFile.existingSecretExisting secret for htpasswd file""
configuration.htpasswdFile.contenthtpasswd file entries (one row per user)""

OAuth2 Proxy deployment parameters

NameDescriptionValue
containerPortOAuth2 Proxy port number4180
replicaCountNumber of OAuth2 Proxy replicas to deploy1
extraArgsadd extra args to the default command[]
livenessProbe.enabledEnable livenessProbe on OAuth2 Proxy nodestrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe0
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe1
livenessProbe.failureThresholdFailure threshold for livenessProbe5
livenessProbe.successThresholdSuccess threshold for livenessProbe1
readinessProbe.enabledEnable readinessProbe on OAuth2 Proxy nodestrue
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe0
readinessProbe.periodSecondsPeriod seconds for readinessProbe10
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe1
readinessProbe.failureThresholdFailure threshold for readinessProbe5
readinessProbe.successThresholdSuccess threshold for readinessProbe1
customLivenessProbeCustom livenessProbe that overrides the default one{}
customReadinessProbeCustom readinessProbe that overrides the default one{}
resources.limitsThe resources limits for the OAuth2 Proxy containers{}
resources.requestsThe r

Deploy oauth2-proxy with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has oauth2-proxy on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartoauth2-proxy is pinned at v1.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply