Add Authentik Gitea secret and public ingress configuration, and update Gitea values for internal CA support
This commit is contained in:
parent
a7f7cd4095
commit
b2af26ead8
9
manifests/authentik-gitea-secret.sh
Executable file
9
manifests/authentik-gitea-secret.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
source "$(dirname "$0")/../.env"
|
||||||
|
|
||||||
|
kubectl create secret generic authentik-gitea-oauth \
|
||||||
|
--namespace gitea \
|
||||||
|
--from-literal=client-id="${AUTHENTIK_GITEA_CLIENT_ID}" \
|
||||||
|
--from-literal=client-secret="${AUTHENTIK_GITEA_CLIENT_SECRET}" \
|
||||||
|
--dry-run=client -o yaml | kubectl apply -f -
|
||||||
31
manifests/authentik-public-ingress.yaml
Normal file
31
manifests/authentik-public-ingress.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# authentik public ingress
|
||||||
|
# Apply: kubectl apply -f manifests/authentik-public-ingress.yaml
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: authentik-public-tls
|
||||||
|
namespace: authentik
|
||||||
|
spec:
|
||||||
|
secretName: authentik-public-tls
|
||||||
|
issuerRef:
|
||||||
|
name: letsencrypt-prod
|
||||||
|
kind: ClusterIssuer
|
||||||
|
dnsNames:
|
||||||
|
- auth.nik4nao.com
|
||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: authentik-public
|
||||||
|
namespace: authentik
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`auth.nik4nao.com`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: authentik-server
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: authentik-public-tls
|
||||||
@ -15,6 +15,14 @@ spec:
|
|||||||
- name: authentik-proxy-outpost
|
- name: authentik-proxy-outpost
|
||||||
namespace: authentik
|
namespace: authentik
|
||||||
port: 9000
|
port: 9000
|
||||||
|
- match: Host(`traefik.home.arpa`) && Path(`/`)
|
||||||
|
kind: Rule
|
||||||
|
middlewares:
|
||||||
|
- name: redirect-to-dashboard
|
||||||
|
namespace: traefik
|
||||||
|
services:
|
||||||
|
- name: api@internal
|
||||||
|
kind: TraefikService
|
||||||
- match: Host(`traefik.home.arpa`) && PathPrefix(`/dashboard`)
|
- match: Host(`traefik.home.arpa`) && PathPrefix(`/dashboard`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
@ -34,6 +42,17 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
secretName: traefik-dashboard-tls
|
secretName: traefik-dashboard-tls
|
||||||
---
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: redirect-to-dashboard
|
||||||
|
namespace: traefik
|
||||||
|
spec:
|
||||||
|
redirectRegex:
|
||||||
|
regex: ^https://traefik.home.arpa/$
|
||||||
|
replacement: https://traefik.home.arpa/dashboard/
|
||||||
|
permanent: true
|
||||||
|
---
|
||||||
apiVersion: cert-manager.io/v1
|
apiVersion: cert-manager.io/v1
|
||||||
kind: Certificate
|
kind: Certificate
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@ -74,4 +74,23 @@ service:
|
|||||||
loadBalancerIP: 192.168.7.77
|
loadBalancerIP: 192.168.7.77
|
||||||
|
|
||||||
postgresql-ha:
|
postgresql-ha:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
env:
|
||||||
|
- name: SSL_CERT_FILE
|
||||||
|
value: /etc/ssl/internal-ca/ca.crt
|
||||||
|
|
||||||
|
extraVolumes:
|
||||||
|
- name: internal-ca
|
||||||
|
configMap:
|
||||||
|
name: internal-ca-cert
|
||||||
|
|
||||||
|
extraVolumeMounts:
|
||||||
|
- name: internal-ca
|
||||||
|
mountPath: /etc/ssl/internal-ca
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
|
initPreScript: |
|
||||||
|
cp /etc/ssl/internal-ca/ca.crt /usr/local/share/ca-certificates/internal-ca.crt
|
||||||
|
update-ca-certificates
|
||||||
Loading…
x
Reference in New Issue
Block a user