This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/helm/templates/web-deployment.yaml

125 lines
4.2 KiB
YAML
Raw Normal View History

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:
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:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
2020-09-15 09:41:11 +00: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 09:41:11 +00: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 09:41:11 +00:00
operator: In
values:
- web
topologyKey: "kubernetes.io/hostname"
initContainers:
2020-12-05 21:08:42 +00:00
- name: authentik-database-migrations
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
2020-09-06 13:52:22 +00:00
args: [migrate]
2019-10-01 13:42:14 +00:00
envFrom:
- configMapRef:
2020-12-05 21:08:42 +00:00
name: {{ include "authentik.fullname" . }}-config
prefix: AUTHENTIK_
- secretRef:
name: {{ include "authentik.fullname" . }}-secret-key
prefix: AUTHENTIK_
2019-10-01 13:42:14 +00:00
env:
2020-12-05 21:08:42 +00:00
- name: AUTHENTIK_REDIS__PASSWORD
2019-10-01 13:42:14 +00: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 13:42:14 +00:00
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-postgresql"
key: postgresql-password
2019-02-08 13:57:16 +00:00
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
2020-09-06 13:52:22 +00:00
args: [server]
2019-10-01 13:42:14 +00:00
envFrom:
- configMapRef:
2020-12-05 21:08:42 +00:00
name: {{ include "authentik.fullname" . }}-config
prefix: AUTHENTIK_
2019-10-01 13:42:14 +00:00
env:
2020-12-05 21:08:42 +00:00
- name: AUTHENTIK_SECRET_KEY
valueFrom:
secretKeyRef:
2020-12-05 21:08:42 +00:00
name: "{{ include "authentik.fullname" . }}-secret-key"
key: "secret_key"
2020-12-05 21:08:42 +00:00
- name: AUTHENTIK_REDIS__PASSWORD
2019-10-01 13:42:14 +00: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 13:42:14 +00:00
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-postgresql"
key: "postgresql-password"
volumeMounts:
2020-12-05 21:08:42 +00:00
- name: authentik-uploads
mountPath: /media
2019-02-08 13:57:16 +00:00
ports:
- name: http
containerPort: 8000
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
httpHeaders:
- name: Host
2020-12-05 21:08:42 +00:00
value: authentik-healthcheck-host
2019-02-08 13:57:16 +00:00
readinessProbe:
httpGet:
path: /
port: http
httpHeaders:
- name: Host
2020-12-05 21:08:42 +00:00
value: authentik-healthcheck-host
2019-02-08 13:57:16 +00:00
resources:
requests:
cpu: 100m
2020-09-15 09:41:11 +00:00
memory: 300M
limits:
cpu: 300m
2021-01-17 17:56:24 +00:00
memory: 600M
volumes:
2020-12-05 21:08:42 +00:00
- name: authentik-uploads
persistentVolumeClaim:
2020-12-05 21:08:42 +00:00
claimName: {{ include "authentik.fullname" . }}-uploads