Add terraform for infra
This commit is contained in:
42
infra/authentik/templates/ingress.yaml
Normal file
42
infra/authentik/templates/ingress.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: authentik-ingress
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`authentik.durp.info`) && PathPrefix(`/`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: authentik-server
|
||||
port: 80
|
||||
tls:
|
||||
secretName: authentik-tls
|
||||
|
||||
---
|
||||
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: authentik-tls
|
||||
spec:
|
||||
secretName: authentik-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-production
|
||||
kind: ClusterIssuer
|
||||
commonName: "authentik.durp.info"
|
||||
dnsNames:
|
||||
- "authentik.durp.info"
|
||||
|
||||
---
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: authentik-external-dns
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: authentik.durp.info
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName: durp.info
|
||||
28
infra/authentik/templates/secrets.yaml
Normal file
28
infra/authentik/templates/secrets.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: authentik-secret
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: db-pass
|
||||
data:
|
||||
- secretKey: dbpass
|
||||
remoteRef:
|
||||
key: secrets/authentik/database
|
||||
property: dbpass
|
||||
- secretKey: secretkey
|
||||
remoteRef:
|
||||
key: secrets/authentik/database
|
||||
property: secretkey
|
||||
- secretKey: postgresql-postgres-password
|
||||
remoteRef:
|
||||
key: secrets/authentik/database
|
||||
property: dbpass
|
||||
- secretKey: postgresql-password
|
||||
remoteRef:
|
||||
key: secrets/authentik/database
|
||||
property: dbpass
|
||||
|
||||
Reference in New Issue
Block a user