authentik

This commit is contained in:
ari committed 2023-03-28 02:48:53 +00:00
1 parent 184de41ab3
commit eb854a49e4
13 files changed
+99 -159

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
apiVersion: v2
name: authentik
description: An infra service for homelab
type: application
version: 0.1.0
dependencies:
- name: authentik
repository: https://charts.goauthentik.io
version: "2023.3.1"
@@ -0,0 +1,15 @@
{{ if .Values.global.tls.enabled }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "authentik-tls"
spec:
secretName: "authentik-tls"
issuerRef:
kind: ClusterIssuer
name: "{{ .Values.global.tls.issuer }}"
commonName: "authentik.core.{{.Values.authelia.domain}}"
dnsNames:
- "authentik.core.{{.Values.authelia.domain}}"
{{ end }}
@@ -0,0 +1,48 @@
---
apiVersion: v1
kind: Secret
metadata:
name: "authentik-env"
# annotations:
secret-generator.v1.mittwald.de/autogenerate: AUTHENTIK_SECRET_KEY
data:
AUTHENTIK_POSTGRESQL__USER: "authentik"
AUTHENTIK_POSTGRESQL__NAME: "authentik"
AUTHENTIK_POSTGRESQL__HOST: "postgres.database.svc.cluster.local"
type: Opaque
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "authentik-env-db"
spec:
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: database
target:
name: "authentik-env"
creationPolicy: Merge
data:
- secretKey: "AUTHENTIK_POSTGRESQL__PASSWORD"
remoteRef:
key: "password.pg.authentik"
property: password
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "authentik-env-smtp"
spec:
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: secrets
target:
name: "authentik-env"
creationPolicy: Merge
data:
- secretKey: "AUTHENTIK_EMAIL__PASSWORD"
remoteRef:
key: "smtp"
property: password
File renamed without changes.
File renamed without changes.
+26
View File
@@ -0,0 +1,26 @@
authentik:
authentik:
secret_key: "changeme"
error_reporting:
enabled: true
envFrom:
- secretRef:
name: authentik-env
ingress:
enabled: true
ingressClassName: traefik
hosts:
- host: authentik.core.home.sosnovsky.ca
paths:
- path: "/"
pathType: Prefix
tls:
- hosts:
- authentik.core.home.sosnovsky.ca
secretName: authentik-tls
postgresql:
enabled: false
redis:
enabled: true
+1
View File
@@ -24,3 +24,4 @@ userGeneration:
users:
- nextcloud
- authelia
- authentik
-6
View File
@@ -1,6 +0,0 @@
apiVersion: v2
name: ldap
description: An infra service for homelab
type: application
version: 0.1.0
dependencies: []
-101
View File
@@ -1,101 +0,0 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ldap
labels:
app.kubernetes.io/name: ldap
spec:
selector:
matchLabels:
app.kubernetes.io/name: ldap
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: ldap
spec:
volumes:
- name: ldapdb
persistentVolumeClaim:
claimName: ldapdb
containers:
- name: ldap
image: docker.io/bitnami/openldap:latest
imagePullPolicy: "IfNotPresent"
resources:
limits:
cpu: 1
memory: "1Gi"
requests:
cpu: 0.5
memory: "250Mi"
volumeMounts:
- name: ldapdb
mountPath: /bitnami/openldap
env:
- name: LDAP_ORGANISATION
value: "Home Cloud"
- name: LDAP_DOMAIN
value: "ldap.{{ .Values.global.domain }}"
- name: LDAP_ROOT
value: "dc=home,dc=sosnovsky,dc=ca"
- name: LDAP_ADMIN_USERNAME
value: "admin"
- name: LDAP_SERVICE_HOST
value: ldap.{{.Release.Namespace}}.svc.cluster.local
- name: LDAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: adminpass
name: ldap-users
ports:
- name: tcp
containerPort: 1389
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpldapadmin
labels:
app.kubernetes.io/name: phpldapadmin
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: phpldapadmin
template:
metadata:
labels:
app.kubernetes.io/name: phpldapadmin
spec:
containers:
- name: main
image: osixia/phpldapadmin:0.9.0
imagePullPolicy: IfNotPresent
env:
- name: PHPLDAPADMIN_LDAP_HOSTS
value: ldap.{{.Release.Namespace}}.svc.cluster.local
- name: PHPLDAPADMIN_HTTPS
value: "false"
ports:
- name: http
containerPort: 80
protocol: TCP
readinessProbe:
initialDelaySeconds: 15
httpGet:
path: /
port: http
livenessProbe:
initialDelaySeconds: 15
httpGet:
path: /
port: http
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
-12
View File
@@ -1,12 +0,0 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ldapdb
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
storageClassName: nfs-generic
-10
View File
@@ -1,10 +0,0 @@
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: ldap-users
annotations:
secret-generator.v1.mittwald.de/autogenerate: "adminpass"
data:
_tmp: ""
-30
View File
@@ -1,30 +0,0 @@
---
apiVersion: v1
kind: Service
metadata:
name: ldap
labels:
app.kubernetes.io/name: ldap
spec:
type: ClusterIP
ports:
- name: tcp
port: 1389
targetPort: tcp
selector:
app.kubernetes.io/name: ldap
---
apiVersion: v1
kind: Service
metadata:
name: phpldapadmin
labels:
app.kubernetes.io/name: phpldapadmin
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: http
selector:
app.kubernetes.io/name: phpldapadmin
View File
Whitespace-only changes.