From ac716c17f76da9ae2cc60d79d1f2d6a2a378f03e Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Tue, 21 Mar 2023 13:42:06 -0400 Subject: [PATCH] initial temp work --- k8s/charts/chart-values/authellia.yaml | 93 ++++++++++++++++++ k8s/charts/templates/app-authellia.yaml | 2 + k8s/infra/authellia/Chart.yaml | 9 ++ .../authellia/templates/secert-authellia.yaml | 22 +++++ k8s/infra/authellia/values-dev.yaml | 0 k8s/infra/authellia/values-prod.yaml | 0 k8s/infra/authellia/values.yaml | 94 +++++++++++++++++++ k8s/infra/database/values.yaml | 1 + 8 files changed, 221 insertions(+) create mode 100644 k8s/charts/chart-values/authellia.yaml create mode 100644 k8s/infra/authellia/Chart.yaml create mode 100644 k8s/infra/authellia/templates/secert-authellia.yaml create mode 100644 k8s/infra/authellia/values-dev.yaml create mode 100644 k8s/infra/authellia/values-prod.yaml create mode 100644 k8s/infra/authellia/values.yaml diff --git a/k8s/charts/chart-values/authellia.yaml b/k8s/charts/chart-values/authellia.yaml new file mode 100644 index 0000000..f3d8481 --- /dev/null +++ b/k8s/charts/chart-values/authellia.yaml @@ -0,0 +1,93 @@ +image: + registry: ghcr.io + repository: authelia/authelia + tag: "" + pullPolicy: IfNotPresent + +ingress: + enabled: true + annotations: {} + certManager: true + className: traefik + subdomain: auth + tls: + enabled: true + secret: authelia-tls + traefikCRD: + enabled: true + disableIngressRoute: false + sticky: true + +pod: + kind: DaemonSet + replicas: 1 + revisionHistoryLimit: 5 + env: + - name: TZ + value: America/Toronto + + resources: + limits: + cpu: "4.00" + memory: 125Mi + requests: + cpu: "0.25" + memory: 50Mi + +configMap: + enabled: true + theme: dark + + ## The available providers are: `local`, `mysql`, `postgres`. You must use one and only one of these providers. + storage: + postgres: + enabled: true + host: postgres.database.svc.cluster.local + port: 5432 + database: authelia + schema: public + username: authelia + timeout: 5s + + notifier: + disable_startup_check: false + smtp: + enabled: false + enabledSecret: false + host: smtp.mail.svc.cluster.local + port: 25 + timeout: 5s + username: test + sender: admin@example.com + identifier: localhost + startup_check_address: test@authelia.com + disable_require_tls: false + disable_starttls: false + tls: + server_name: "" + skip_verify: false + filesystem: + enabled: true + filename: /config/notification.txt + +secret: + existingSecret: authelia + mountPath: /secrets + excludeVolumeAndMounts: false + + storage: + key: STORAGE_PASSWORD + value: "" + filename: STORAGE_PASSWORD + session: + key: SESSION_ENCRYPTION_KEY + value: "" + filename: SESSION_ENCRYPTION_KEY + redis: + key: REDIS_PASSWORD + value: "" + filename: REDIS_PASSWORD + smtp: + key: SMTP_PASSWORD + value: "" + filename: SMTP_PASSWORD diff --git a/k8s/charts/templates/app-authellia.yaml b/k8s/charts/templates/app-authellia.yaml index 4aad053..3a7f167 100644 --- a/k8s/charts/templates/app-authellia.yaml +++ b/k8s/charts/templates/app-authellia.yaml @@ -12,6 +12,8 @@ spec: targetRevision: "0.8.57" helm: releaseName: authelia + values: |- + domain: auth.{{ .Values.global.domain }} destination: server: https://kubernetes.default.svc namespace: "authelia" diff --git a/k8s/infra/authellia/Chart.yaml b/k8s/infra/authellia/Chart.yaml new file mode 100644 index 0000000..83433f9 --- /dev/null +++ b/k8s/infra/authellia/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: authellia +description: An infra service for homelab +type: application +version: 0.1.0 +dependencies: + - name: authelia + repository: https://charts.authelia.com + version: "0.8.57" diff --git a/k8s/infra/authellia/templates/secert-authellia.yaml b/k8s/infra/authellia/templates/secert-authellia.yaml new file mode 100644 index 0000000..494cee2 --- /dev/null +++ b/k8s/infra/authellia/templates/secert-authellia.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" +spec: + refreshInterval: 1h + secretStoreRef: + kind: ClusterSecretStore + name: database + target: + name: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" + data: + - secretKey: "{{ .Values.nextcloud.externalDatabase.existingSecret.usernameKey }}" + remoteRef: + key: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" + property: username + + - secretKey: "{{ .Values.nextcloud.externalDatabase.existingSecret.passwordKey }}" + remoteRef: + key: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}" + property: password diff --git a/k8s/infra/authellia/values-dev.yaml b/k8s/infra/authellia/values-dev.yaml new file mode 100644 index 0000000..e69de29 diff --git a/k8s/infra/authellia/values-prod.yaml b/k8s/infra/authellia/values-prod.yaml new file mode 100644 index 0000000..e69de29 diff --git a/k8s/infra/authellia/values.yaml b/k8s/infra/authellia/values.yaml new file mode 100644 index 0000000..a9e711f --- /dev/null +++ b/k8s/infra/authellia/values.yaml @@ -0,0 +1,94 @@ +authelia: + image: + registry: ghcr.io + repository: authelia/authelia + tag: "" + pullPolicy: IfNotPresent + + ingress: + enabled: true + annotations: {} + certManager: true + className: traefik + subdomain: auth + tls: + enabled: true + secret: authelia-tls + traefikCRD: + enabled: true + disableIngressRoute: false + sticky: true + + pod: + kind: DaemonSet + replicas: 1 + revisionHistoryLimit: 5 + env: + - name: TZ + value: America/Toronto + + resources: + limits: + cpu: "4.00" + memory: 125Mi + requests: + cpu: "0.25" + memory: 50Mi + + configMap: + enabled: true + theme: dark + + ## The available providers are: `local`, `mysql`, `postgres`. You must use one and only one of these providers. + storage: + postgres: + enabled: true + host: postgres.database.svc.cluster.local + port: 5432 + database: authelia + schema: public + username: authelia + timeout: 5s + + notifier: + disable_startup_check: false + smtp: + enabled: false + enabledSecret: false + host: smtp.mail.svc.cluster.local + port: 25 + timeout: 5s + username: test + sender: admin@example.com + identifier: localhost + startup_check_address: test@authelia.com + disable_require_tls: false + disable_starttls: false + tls: + server_name: "" + skip_verify: false + filesystem: + enabled: true + filename: /config/notification.txt + + secret: + existingSecret: authelia + mountPath: /secrets + excludeVolumeAndMounts: false + + storage: + key: STORAGE_PASSWORD + value: "" + filename: STORAGE_PASSWORD + session: + key: SESSION_ENCRYPTION_KEY + value: "" + filename: SESSION_ENCRYPTION_KEY + redis: + key: REDIS_PASSWORD + value: "" + filename: REDIS_PASSWORD + smtp: + key: SMTP_PASSWORD + value: "" + filename: SMTP_PASSWORD diff --git a/k8s/infra/database/values.yaml b/k8s/infra/database/values.yaml index b1aaf3c..e01cbfb 100644 --- a/k8s/infra/database/values.yaml +++ b/k8s/infra/database/values.yaml @@ -23,3 +23,4 @@ userGeneration: tfVersion: "1.3.7" users: - nextcloud + - authelia