Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charts/authentik: add ability to disable server or worker #329

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/authentik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ The secret `authentik-postgres-credentials` must have `username` and `password`
| authentik.email.use_ssl | bool | `false` | Enable either use_tls or use_ssl, they can't be enabled at the same time. |
| authentik.email.use_tls | bool | `false` | Enable either use_tls or use_ssl, they can't be enabled at the same time. |
| authentik.email.username | string | `""` | SMTP credentials, when left empty, no authentication will be done |
| authentik.enabled | bool | `true` | whether to create the authentik configuration secret |
| authentik.error_reporting.enabled | bool | `false` | This sends anonymous usage-data, stack traces on errors and performance data to sentry.beryju.org, and is fully opt-in |
| authentik.error_reporting.environment | string | `"k8s"` | This is a string that is sent to sentry with your error reports |
| authentik.error_reporting.send_pii | bool | `false` | Send PII (Personally identifiable information) data to sentry |
Expand Down Expand Up @@ -217,6 +218,7 @@ The secret `authentik-postgres-credentials` must have `username` and `password`
| server.deploymentStrategy | object | `{}` (defaults to global.deploymentStrategy) | Deployment strategy to be added to the authentik server Deployment |
| server.dnsConfig | object | `{}` | [DNS configuration] |
| server.dnsPolicy | string | `""` | Alternative DNS policy for authentik server pods |
| server.enabled | bool | `true` | whether to enable server resources |
| server.env | list | `[]` (See [values.yaml]) | Environment variables to pass to the authentik server. Does not apply to GeoIP See configuration options at https://goauthentik.io/docs/installation/configuration/ |
| server.envFrom | list | `[]` (See [values.yaml]) | envFrom to pass to the authentik server. Does not apply to GeoIP |
| server.extraContainers | list | `[]` | Additional containers to be added to the authentik server pod # Note: Supports use of custom Helm templates |
Expand Down Expand Up @@ -328,6 +330,7 @@ The secret `authentik-postgres-credentials` must have `username` and `password`
| worker.deploymentStrategy | object | `{}` (defaults to global.deploymentStrategy) | Deployment strategy to be added to the authentik worker Deployment |
| worker.dnsConfig | object | `{}` | [DNS configuration] |
| worker.dnsPolicy | string | `""` | Alternative DNS policy for authentik worker pods |
| worker.enabled | bool | `true` | whether to enable worker resources |
| worker.env | list | `[]` (See [values.yaml]) | Environment variables to pass to the authentik worker. Does not apply to GeoIP See configuration options at https://goauthentik.io/docs/installation/configuration/ |
| worker.envFrom | list | `[]` (See [values.yaml]) | envFrom to pass to the authentik worker. Does not apply to GeoIP |
| worker.extraContainers | list | `[]` | Additional containers to be added to the authentik worker pod # Note: Supports use of custom Helm templates |
Expand Down
2 changes: 2 additions & 0 deletions charts/authentik/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.authentik.enabled }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -15,3 +16,4 @@ data:
GEOIPUPDATE_ACCOUNT_ID: {{ required "geoip account id required" .Values.geoip.accountId | b64enc | quote }}
GEOIPUPDATE_LICENSE_KEY: {{ required "geoip license key required" .Values.geoip.licenseKey | b64enc | quote }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -234,3 +235,4 @@ spec:
{{- if .Values.server.dnsPolicy }}
dnsPolicy: {{ .Values.server.dnsPolicy }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
{{- if .Values.server.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
Expand Down Expand Up @@ -43,3 +44,4 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
{{- if .Values.server.ingress.enabled -}}
{{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}}
{{- $paths := .Values.server.ingress.paths -}}
Expand Down Expand Up @@ -69,3 +70,4 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
{{- if .Values.server.metrics.enabled }}
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -32,3 +33,4 @@ spec:
selector:
{{- include "authentik.selectorLabels" (dict "context" . "component" .Values.server.name) | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
{{- if .Values.server.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
Expand All @@ -23,3 +24,4 @@ spec:
matchLabels:
{{- include "authentik.selectorLabels" (dict "context" . "component" .Values.server.name) | nindent 6 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -67,3 +68,4 @@ spec:
{{- with .Values.server.service.publishNotReadyAddresses }}
publishNotReadyAddresses: {{ . }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/server/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.server.enabled }}
{{- if and .Values.server.metrics.enabled .Values.server.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand Down Expand Up @@ -48,3 +49,4 @@ spec:
matchLabels:
{{- include "authentik.selectorLabels" (dict "context" . "component" (printf "%s-metrics" .Values.server.name)) | nindent 6 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/worker/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.worker.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -240,3 +241,4 @@ spec:
{{- if .Values.worker.dnsPolicy }}
dnsPolicy: {{ .Values.worker.dnsPolicy }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/worker/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.worker.enabled }}
{{- if .Values.worker.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
Expand Down Expand Up @@ -43,3 +44,4 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/authentik/templates/worker/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.worker.enabled }}
{{- if .Values.worker.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
Expand All @@ -23,3 +24,4 @@ spec:
matchLabels:
{{- include "authentik.selectorLabels" (dict "context" . "component" .Values.worker.name) | nindent 6 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/authentik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ global:

## Authentik configuration
authentik:
# -- whether to create the authentik configuration secret
enabled: true
# -- Log level for server and worker
log_level: info
# -- Secret key used for cookie singing and unique user IDs,
Expand Down Expand Up @@ -219,6 +221,9 @@ blueprints:

## authentik server
server:
# -- whether to enable server resources
enabled: true

# -- authentik server name
name: server

Expand Down Expand Up @@ -607,6 +612,9 @@ server:

## authentik worker
worker:
# -- whether to enable worker resources
enabled: true

# -- authentik worker name
name: worker

Expand Down