Files
auricom-home-cluster/kubernetes/apps/default/authelia/app/helmrelease.yaml
2025-01-02 15:53:03 +01:00

163 lines
4.7 KiB
YAML

---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app authelia
namespace: default
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.6.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
maxHistory: 2
install:
createNamespace: true
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
uninstall:
keepHistory: false
dependsOn:
- name: lldap
- name: smtp-relay
values:
defaultPodOptions:
enableServiceLinks: false
securityContext:
runAsUser: 568
runAsGroup: 568
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: *app
controllers:
authelia:
replicas: 2
strategy: RollingUpdate
annotations:
reloader.stakater.com/auto: "true"
initContainers:
init-db:
image:
repository: ghcr.io/onedr0p/postgres-init
tag: 16
envFrom: &envFrom
- secretRef:
name: authelia-secret
containers:
app:
image:
repository: ghcr.io/authelia/authelia
tag: 4.38.18@sha256:a5e6fa4b1dbdc296f80f9175157b145a0598690ec8cd4d6e105cd4498fe0c731
env:
AUTHELIA_LOG_LEVEL: info
AUTHELIA_NOTIFIER_SMTP_SENDER: "Authelia <authelia@${SECRET_DOMAIN}>"
AUTHELIA_SERVER_DISABLE_HEALTHCHECK: "true"
AUTHELIA_SERVER_ADDRESS: tcp://0.0.0.0:8888
AUTHELIA_TELEMETRY_METRICS_ADDRESS: tcp://0.0.0.0:8080
AUTHELIA_TELEMETRY_METRICS_ENABLED: "true"
AUTHELIA_THEME: dark
AUTHELIA_TOTP_ISSUER: authelia.com
AUTHELIA_WEBAUTHN_DISABLE: "true"
X_AUTHELIA_CONFIG: /config/configuration.yaml
X_AUTHELIA_CONFIG_FILTERS: template
envFrom: *envFrom
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /api/health
port: &port 8888
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
startup:
enabled: false
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
memory: 128Mi
service:
app:
controller: *app
ports:
http:
port: *port
metrics:
port: 8080
serviceMonitor:
app:
serviceName: *app
enabled: true
endpoints:
- port: metrics
scheme: http
path: /metrics
interval: 1m
scrapeTimeout: 10s
ingress:
app:
enabled: true
className: nginx
annotations:
external-dns.alpha.kubernetes.io/enabled: "true"
external-dns.alpha.kubernetes.io/target: services.${SECRET_DOMAIN}.
nginx.ingress.kubernetes.io/configuration-snippet: |
add_header Cache-Control "no-store";
add_header Pragma "no-cache";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
hajimari.io/icon: mdi:shield-account
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Infrastructure
gethomepage.dev/name: Authelia
gethomepage.dev/icon: authelia.png
gethomepage.dev/pod-selector: >-
app in (
authelia
)
hosts:
- host: &host auth.${SECRET_EXTERNAL_DOMAIN}
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
type: configMap
name: authelia-configmap
globalMounts:
- path: /config/configuration.yaml
subPath: configuration.yaml
readOnly: true
secret-files:
enabled: true
type: secret
name: authelia-secret
globalMounts:
- path: /config/secret