From 7880c7fb981ba56f3b0920b8b615486dac9f9002 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 16 Apr 2021 12:31:55 +0200 Subject: [PATCH] helm: make storage class, size and mode configurable Signed-off-by: Jens Langhammer --- helm/README.md | 5 +++++ helm/templates/geoip-pvc.yaml | 5 +++-- helm/templates/pvc.yaml | 5 +++-- helm/values.yaml | 7 +++++++ website/docs/installation/kubernetes.md | 10 ++++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/helm/README.md b/helm/README.md index d846c398d..5327a9257 100644 --- a/helm/README.md +++ b/helm/README.md @@ -22,6 +22,11 @@ | config.email.use_ssl | false | Enable SSL | | config.email.timeout | 10 | SMTP Timeout | | config.email.from | authentik@localhost | Email address authentik will send from, should have a correct @domain | +| pvc.mode | ReadWriteMany | Mode that the PVCs are created in (uploads and GeoIP, if enabled) | +| pvc.uploadsSize | 5Gi | Size for the uploads PVC | +| pvc.uploadsStorageClass | null | Storage class for the uploads PVC (default: use default storage class) | +| pvc.geoIpSize | 1Gi | Size for the GeoIP PVC | +| pvc.geoIpStorageClass | null | Storage class for the GeoIP PVC (default: use default storage class) | | geoip.enabled | false | Optionally enable GeoIP | | geoip.accountId | | GeoIP MaxMind Account ID | | geoip.licenseKey | | GeoIP MaxMind License key | diff --git a/helm/templates/geoip-pvc.yaml b/helm/templates/geoip-pvc.yaml index 2cd0caa14..28a5ab278 100644 --- a/helm/templates/geoip-pvc.yaml +++ b/helm/templates/geoip-pvc.yaml @@ -10,8 +10,9 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: accessModes: - - ReadWriteMany + - {{ .Values.pvc.mode }} + storageClassName: {{ .Values.pvc.geoIpStorageClass }} resources: requests: - storage: 1Gi + storage: {{ .Values.pvc.geoIpSize }} {{- end }} diff --git a/helm/templates/pvc.yaml b/helm/templates/pvc.yaml index 45c665ac4..cb5b8ae67 100644 --- a/helm/templates/pvc.yaml +++ b/helm/templates/pvc.yaml @@ -9,7 +9,8 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: accessModes: - - ReadWriteMany + - {{ .Values.pvc.mode }} + storageClassName: {{ .Values.pvc.uploadsStorageClass }} resources: requests: - storage: 5Gi + storage: {{ .Values.pvc.uploadsSize }} diff --git a/helm/values.yaml b/helm/values.yaml index f9f591156..7417e63b8 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -17,6 +17,13 @@ kubernetesIntegration: true monitoring: enabled: false +pvc: + mode: ReadWriteMany + uploadsSize: 5Gi + uploadsStorageClass: null + geoIpSize: 1Gi + geoIpStorageClass: null + config: # Optionally specify fixed secret_key, otherwise generated automatically # secretKey: _k*@6h2u2@q-dku57hhgzb7tnx*ba9wodcb^s9g0j59@=y(@_o diff --git a/website/docs/installation/kubernetes.md b/website/docs/installation/kubernetes.md index 7910c5b79..1d10294cb 100644 --- a/website/docs/installation/kubernetes.md +++ b/website/docs/installation/kubernetes.md @@ -32,6 +32,16 @@ workerReplicas: 1 # Enable the Kubernetes integration which lets authentik deploy outposts into kubernetes kubernetesIntegration: true +monitoring: # Optionally deploy Prometheus Rules and ServiceMonitors + enabled: false + +pvc: + mode: ReadWriteMany + uploadsSize: 5Gi + uploadsStorageClass: null + geoIpSize: 1Gi + geoIpStorageClass: null + config: # Optionally specify fixed secret_key, otherwise generated automatically # secretKey: _k*@6h2u2@q-dku57hhgzb7tnx*ba9wodcb^s9g0j59@=y(@_o