authelia
This commit is contained in:
1 parent
411b1379de
commit
00830f9a96
9 files changed
+404
-1
No files matched your search
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: ingress
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.16.0"
|
||||
@@ -0,0 +1,74 @@
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: Secret
|
||||
# metadata:
|
||||
# name: authelia-files
|
||||
# data:
|
||||
# logo.png: ".Files.Get "files/logo.png" | b64enc }}"
|
||||
# favicon.ico: ".Files.Get "files/favico.svg" | b64enc }}"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: authelia-config
|
||||
data:
|
||||
configuration.yml: |
|
||||
server:
|
||||
asset_path: /config/assets/
|
||||
address: 'tcp://:80'
|
||||
endpoints:
|
||||
authz:
|
||||
forward-auth:
|
||||
implementation: 'ForwardAuth'
|
||||
authn_strategies:
|
||||
- name: 'HeaderAuthorization'
|
||||
schemes:
|
||||
- 'Basic'
|
||||
- name: 'CookieSession'
|
||||
ext-authz:
|
||||
implementation: 'ExtAuthz'
|
||||
authn_strategies:
|
||||
- name: 'HeaderAuthorization'
|
||||
schemes:
|
||||
- 'Basic'
|
||||
- name: 'CookieSession'
|
||||
auth-request:
|
||||
implementation: 'AuthRequest'
|
||||
authn_strategies:
|
||||
- name: 'HeaderAuthRequestProxyAuthorization'
|
||||
schemes:
|
||||
- 'Basic'
|
||||
- name: 'CookieSession'
|
||||
webauthn:
|
||||
disable: false
|
||||
display_name: '{{ .Values.authelia.appName }}'
|
||||
attestation_conveyance_preference: 'indirect'
|
||||
user_verification: 'preferred'
|
||||
timeout: '60s'
|
||||
totp:
|
||||
disable: false
|
||||
issuer: '{{ .Values.global.dns.primary.domain }}'
|
||||
algorithm: 'sha1'
|
||||
digits: 6
|
||||
period: 30
|
||||
skew: 1
|
||||
secret_size: 32
|
||||
allowed_algorithms:
|
||||
- 'SHA1'
|
||||
allowed_digits:
|
||||
- 6
|
||||
allowed_periods:
|
||||
- 30
|
||||
disable_reuse_security_policy: false
|
||||
log:
|
||||
level: '{{ .Values.authelia.logLevel }}'
|
||||
{{ if .Values.authelia.enableAdminUI }}
|
||||
administration:
|
||||
enable: true
|
||||
enable_ui: true
|
||||
address: 'tcp://:9092'
|
||||
url: 'https://{{.Values.global.dns.primary.domain}}'
|
||||
groups:
|
||||
- 'admins'
|
||||
{{ end }}
|
||||
{{ tpl (.Values.authelia.configuration | toYaml) . | nindent 4 }}
|
||||
@@ -0,0 +1,120 @@
|
||||
---
|
||||
apiVersion: generators.external-secrets.io/v1alpha1
|
||||
kind: Password
|
||||
metadata:
|
||||
name: authelia-db
|
||||
spec:
|
||||
length: 16
|
||||
digits: 5
|
||||
symbols: 5
|
||||
symbolCharacters: "-_$@"
|
||||
noUpper: false
|
||||
allowRepeat: true
|
||||
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: "password"
|
||||
spec:
|
||||
refreshInterval: "30m"
|
||||
target:
|
||||
name: authelia-db-secrets
|
||||
creationPolicy: Merge
|
||||
deletionPolicy: Merge
|
||||
template:
|
||||
engineVersion: v2
|
||||
data:
|
||||
POSTGRES_PASSWORD: "{{`{{.password}}`}}"
|
||||
AUTHELIA_STORAGE_POSTGRES_PASSWORD: "{{`{{.password}}`}}"
|
||||
|
||||
dataFrom:
|
||||
- sourceRef:
|
||||
generatorRef:
|
||||
apiVersion: generators.external-secrets.io/v1alpha1
|
||||
kind: Password
|
||||
name: "authelia-db"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: authelia-db-secrets
|
||||
type: Opaque
|
||||
stringData:
|
||||
POSTGRES_DB: "authelia"
|
||||
POSTGRES_USER: "authelia"
|
||||
AUTHELIA_STORAGE_POSTGRES_ADDRESS: "tcp://authelia-db.{{ .Release.Namespace }}.svc.cluster.local:5432"
|
||||
AUTHELIA_STORAGE_POSTGRES_USERNAME: "authelia"
|
||||
AUTHELIA_STORAGE_POSTGRES_DATABASE: "authelia"
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: authelia-db
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: "authelia-db"
|
||||
serviceName: authelia-db
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: "authelia-db"
|
||||
spec:
|
||||
containers:
|
||||
- name: db
|
||||
image: {{ .Values.authelia.pg.image }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: authelia-db-secrets
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 5432
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 5432
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1
|
||||
memory: 5Gi
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 5Gi
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: authelia-db
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: "authelia-db"
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: db
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: authelia-config
|
||||
spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: 10M
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: authelia
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: authelia
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: authelia
|
||||
annotations:
|
||||
checksums/config: "{{ .Values.authelia.configuration | toYaml | sha256sum }}"
|
||||
spec:
|
||||
enableServiceLinks: false
|
||||
volumes:
|
||||
- name: config-data
|
||||
persistentVolumeClaim:
|
||||
claimName: authelia-config
|
||||
- name: config-yaml
|
||||
configMap:
|
||||
name: authelia-config
|
||||
defaultMode: 0400
|
||||
- name: files
|
||||
secret:
|
||||
secretName: authelia-files
|
||||
defaultMode: 0400
|
||||
containers:
|
||||
- name: authelia
|
||||
image: "{{ .Values.authelia.image }}"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: authelia-db-secrets
|
||||
- secretRef:
|
||||
name: authelia-redis-secrets
|
||||
- secretRef:
|
||||
name: authelia-secrets
|
||||
volumeMounts:
|
||||
- mountPath: "/config"
|
||||
name: config-data
|
||||
- mountPath: /config/configuration.yml
|
||||
subPath: configuration.yml
|
||||
name: config-yaml
|
||||
- mountPath: /config/assets/
|
||||
name: files
|
||||
resources:
|
||||
requests:
|
||||
memory: "1Gi"
|
||||
cpu: "1"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "1"
|
||||
ports:
|
||||
- containerPort: 80
|
||||
{{ if .Values.authelia.enableAdminUI }}
|
||||
- containerPort: 9092
|
||||
{{ end }}
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: authelia
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: "authelia"
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
{{ if .Values.authelia.enableAdminUI }}
|
||||
- name: admin
|
||||
port: 9092
|
||||
targetPort: 9092
|
||||
{{ end }}
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: authelia-redis-secrets
|
||||
type: Opaque
|
||||
stringData:
|
||||
AUTHELIA_SESSION_REDIS_HOST: "authelia-redis.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: authelia-redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: "authelia-redis"
|
||||
serviceName: authelia-redis
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: "authelia-redis"
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: {{ .Values.authelia.redis.image }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1
|
||||
memory: 5Gi
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 5Gi
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: authelia-redis
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: "authelia-redis"
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: redis
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,35 @@
|
||||
global:
|
||||
dns:
|
||||
primary:
|
||||
domain: "internal"
|
||||
|
||||
authelia:
|
||||
appName: 'Sosnovsky Cloud'
|
||||
logLevel: INFO
|
||||
image: "docker.io/authelia/authelia:latest"
|
||||
enableAdminUI: true
|
||||
configuration:
|
||||
theme: 'dark'
|
||||
authentication_backend:
|
||||
file:
|
||||
path: '/config/users_database.yml'
|
||||
watch: true
|
||||
access_control:
|
||||
default_policy: 'deny'
|
||||
rules:
|
||||
- domain: "auth.{{ .Values.global.dns.primary.domain }}"
|
||||
policy: one_factor
|
||||
- domain: "{{ .Values.global.dns.primary.domain }}"
|
||||
policy: two_factor
|
||||
notifier:
|
||||
filesystem:
|
||||
filename: '/config/notification.txt'
|
||||
session:
|
||||
name: 'authelia_session'
|
||||
inactivity: '5m'
|
||||
expiration: '1h'
|
||||
remember_me: '1M'
|
||||
cookies:
|
||||
- domain: '{{ .Values.global.dns.primary.domain }}'
|
||||
authelia_url: 'https://auth.{{ .Values.global.dns.primary.domain }}'
|
||||
|
||||
@@ -23,6 +23,9 @@ spec:
|
||||
destination:
|
||||
namespace: "{{`{{path.basename}}`}}"
|
||||
server: https://kubernetes.default.svc
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- RespectIgnoreDifferences=true
|
||||
project: main``
|
||||
revisionHistoryLimit: 10
|
||||
source:
|
||||
@@ -35,4 +38,4 @@ spec:
|
||||
- values-{{$.Values.global.deployment}}.yaml
|
||||
values: |-
|
||||
global:
|
||||
{{ .Values.global | toYaml | nindent 20 }}
|
||||
{{ .Values.global | toYaml | nindent 20 }}
|
||||
Reference in new issue
Block a user