2019-11-07 09:24:27 +00:00
|
|
|
apiVersion: apps/v1
|
2019-02-08 13:57:16 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2020-12-05 21:08:42 +00:00
|
|
|
name: {{ include "authentik.fullname" . }}-web
|
2019-02-08 13:57:16 +00:00
|
|
|
labels:
|
2020-12-05 21:08:42 +00:00
|
|
|
app.kubernetes.io/name: {{ include "authentik.name" . }}
|
|
|
|
helm.sh/chart: {{ include "authentik.chart" . }}
|
2019-02-08 13:57:16 +00:00
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
2020-12-05 21:08:42 +00:00
|
|
|
k8s.goauthentik.io/component: web
|
2019-02-08 13:57:16 +00:00
|
|
|
spec:
|
2020-09-10 14:07:56 +01:00
|
|
|
replicas: {{ .Values.serverReplicas }}
|
2019-02-08 13:57:16 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2020-12-05 21:08:42 +00:00
|
|
|
app.kubernetes.io/name: {{ include "authentik.name" . }}
|
2019-02-08 13:57:16 +00:00
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
2020-12-05 21:08:42 +00:00
|
|
|
k8s.goauthentik.io/component: web
|
2019-02-08 13:57:16 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2020-12-05 21:08:42 +00:00
|
|
|
app.kubernetes.io/name: {{ include "authentik.name" . }}
|
2019-02-08 13:57:16 +00:00
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
2020-12-05 21:08:42 +00:00
|
|
|
k8s.goauthentik.io/component: web
|
2019-02-08 13:57:16 +00:00
|
|
|
spec:
|
2020-09-13 23:12:40 +01:00
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
2020-09-15 10:41:11 +01:00
|
|
|
- weight: 1
|
|
|
|
podAffinityTerm:
|
|
|
|
labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app.kubernetes.io/name
|
|
|
|
operator: In
|
|
|
|
values:
|
2020-12-05 21:08:42 +00:00
|
|
|
- {{ include "authentik.name" . }}
|
2020-09-15 10:41:11 +01:00
|
|
|
- key: app.kubernetes.io/instance
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- {{ .Release.Name }}
|
2020-12-05 21:08:42 +00:00
|
|
|
- key: k8s.goauthentik.io/component
|
2020-09-15 10:41:11 +01:00
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- web
|
|
|
|
topologyKey: "kubernetes.io/hostname"
|
2019-07-22 14:22:10 +01:00
|
|
|
initContainers:
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: authentik-database-migrations
|
2020-08-25 17:02:51 +01:00
|
|
|
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
|
2020-12-12 22:07:13 +00:00
|
|
|
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
2020-09-06 14:52:22 +01:00
|
|
|
args: [migrate]
|
2019-10-01 14:42:14 +01:00
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
2020-12-05 21:08:42 +00:00
|
|
|
name: {{ include "authentik.fullname" . }}-config
|
|
|
|
prefix: AUTHENTIK_
|
2021-01-04 23:41:10 +00:00
|
|
|
- secretRef:
|
|
|
|
name: {{ include "authentik.fullname" . }}-secret-key
|
|
|
|
prefix: AUTHENTIK_
|
2019-10-01 14:42:14 +01:00
|
|
|
env:
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: AUTHENTIK_REDIS__PASSWORD
|
2019-10-01 14:42:14 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: "{{ .Release.Name }}-redis"
|
|
|
|
key: redis-password
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
2019-10-01 14:42:14 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: "{{ .Release.Name }}-postgresql"
|
|
|
|
key: postgresql-password
|
2019-02-08 13:57:16 +00:00
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
2020-08-25 17:02:51 +01:00
|
|
|
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
|
2020-12-12 22:07:13 +00:00
|
|
|
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
2020-09-06 14:52:22 +01:00
|
|
|
args: [server]
|
2019-10-01 14:42:14 +01:00
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
2020-12-05 21:08:42 +00:00
|
|
|
name: {{ include "authentik.fullname" . }}-config
|
|
|
|
prefix: AUTHENTIK_
|
2021-01-17 22:01:58 +00:00
|
|
|
- secretRef:
|
|
|
|
name: {{ include "authentik.fullname" . }}-secret-key
|
|
|
|
prefix: AUTHENTIK_
|
2019-10-01 14:42:14 +01:00
|
|
|
env:
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: AUTHENTIK_REDIS__PASSWORD
|
2019-10-01 14:42:14 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: "{{ .Release.Name }}-redis"
|
2020-08-25 16:43:37 +01:00
|
|
|
key: "redis-password"
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
2019-10-01 14:42:14 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: "{{ .Release.Name }}-postgresql"
|
2020-08-25 16:43:37 +01:00
|
|
|
key: "postgresql-password"
|
2021-03-11 16:32:16 +00:00
|
|
|
{{ if .Values.geoip.enabled -}}
|
|
|
|
- name: AUTHENTIK_AUTHENTIK__GEOIP
|
|
|
|
value: /geoip/GeoLite2-City.mmdb
|
|
|
|
{{- end }}
|
2020-11-23 19:50:19 +00:00
|
|
|
volumeMounts:
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: authentik-uploads
|
2020-11-23 19:50:19 +00:00
|
|
|
mountPath: /media
|
2021-03-11 16:32:16 +00:00
|
|
|
{{ if .Values.geoip.enabled -}}
|
|
|
|
- name: geoip
|
|
|
|
mountPath: /geoip
|
|
|
|
{{- end }}
|
2019-02-08 13:57:16 +00:00
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 8000
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
2021-02-06 20:07:05 +00:00
|
|
|
path: /-/health/live/
|
2019-02-08 13:57:16 +00:00
|
|
|
port: http
|
2021-02-24 18:39:35 +00:00
|
|
|
initialDelaySeconds: 15
|
2019-02-08 13:57:16 +00:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
2021-02-06 20:07:05 +00:00
|
|
|
path: /-/health/ready/
|
2019-02-08 13:57:16 +00:00
|
|
|
port: http
|
2021-02-24 18:39:35 +00:00
|
|
|
initialDelaySeconds: 15
|
2019-02-08 13:57:16 +00:00
|
|
|
resources:
|
2019-07-22 14:22:10 +01:00
|
|
|
requests:
|
2019-10-07 17:41:43 +01:00
|
|
|
cpu: 100m
|
2020-09-15 10:41:11 +01:00
|
|
|
memory: 300M
|
2019-07-22 14:22:10 +01:00
|
|
|
limits:
|
2019-10-07 17:41:43 +01:00
|
|
|
cpu: 300m
|
2021-01-17 17:56:24 +00:00
|
|
|
memory: 600M
|
2020-11-23 19:50:19 +00:00
|
|
|
volumes:
|
2020-12-05 21:08:42 +00:00
|
|
|
- name: authentik-uploads
|
2020-11-23 19:50:19 +00:00
|
|
|
persistentVolumeClaim:
|
2020-12-05 21:08:42 +00:00
|
|
|
claimName: {{ include "authentik.fullname" . }}-uploads
|
2021-03-11 16:32:16 +00:00
|
|
|
{{ if .Values.geoip.enabled -}}
|
|
|
|
- name: geoip
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ include "authentik.fullname" . }}-geoip
|
|
|
|
{{- end }}
|