mirror of
https://github.com/zoriya/snow.git
synced 2026-06-03 12:06:31 +00:00
wip: Use cert-manager for cnpg's auth
This commit is contained in:
@@ -41,3 +41,10 @@ spec:
|
|||||||
- http01:
|
- http01:
|
||||||
ingress:
|
ingress:
|
||||||
ingressClassName: cilium
|
ingressClassName: cilium
|
||||||
|
---
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: ClusterIssuer
|
||||||
|
metadata:
|
||||||
|
name: selfsigned
|
||||||
|
spec:
|
||||||
|
selfSigned: {}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: cnpg
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: cnpg
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
# needed because the CRDs are too long for kubectl apply
|
||||||
|
- ServerSideApply=true
|
||||||
|
source:
|
||||||
|
repoURL: https://cloudnative-pg.github.io/charts
|
||||||
|
chart: cloudnative-pg
|
||||||
|
targetRevision: v0.24.0
|
||||||
|
helm:
|
||||||
|
valuesObject: {}
|
||||||
+8
-40
@@ -1,52 +1,20 @@
|
|||||||
kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: cnpg
|
|
||||||
---
|
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: cnpg
|
name: postgres
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: cnpg
|
namespace: postgres
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
selfHeal: true
|
selfHeal: false
|
||||||
# needed because the CRDs are too long for kubectl apply
|
syncOption:
|
||||||
syncOptions:
|
- CreateNamespace=true
|
||||||
- ServerSideApply=true
|
|
||||||
source:
|
source:
|
||||||
repoURL: https://cloudnative-pg.github.io/charts
|
repoURL: https://github.com/zoriya/snow
|
||||||
chart: cloudnative-pg
|
targetRevision: HEAD
|
||||||
targetRevision: v0.24.0
|
path: apps/postgres
|
||||||
helm:
|
|
||||||
valuesObject: {}
|
|
||||||
---
|
|
||||||
kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: postgres
|
|
||||||
---
|
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: Cluster
|
|
||||||
metadata:
|
|
||||||
name: postgres-cluster
|
|
||||||
namespace: postgres
|
|
||||||
spec:
|
|
||||||
instances: 3
|
|
||||||
|
|
||||||
storage:
|
|
||||||
size: 10Gi
|
|
||||||
|
|
||||||
# this is here because no `Role` crd exsists yet.
|
|
||||||
# see https://github.com/cloudnative-pg/cloudnative-pg/issues/5341
|
|
||||||
managed:
|
|
||||||
roles:
|
|
||||||
- name: authentik
|
|
||||||
login: true
|
|
||||||
disablePassword: true
|
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: postgres-cluster-ca
|
||||||
|
spec:
|
||||||
|
secretName: postgres-cluster-ca
|
||||||
|
secretTemplate:
|
||||||
|
labels:
|
||||||
|
cnpg.io/reload: ""
|
||||||
|
usages:
|
||||||
|
- client auth
|
||||||
|
commonName: streaming_replica
|
||||||
|
issuerRef:
|
||||||
|
name: selfsigned
|
||||||
|
kind: ClusterIssuer
|
||||||
|
group: cert-manager.io
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: postgres-cluster
|
||||||
|
namespace: postgres
|
||||||
|
spec:
|
||||||
|
instances: 3
|
||||||
|
|
||||||
|
storage:
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
|
certificates:
|
||||||
|
clientCASecret: postgres-cert-ca
|
||||||
|
replicationTLSSecret: postgres-cert-ca
|
||||||
|
|
||||||
|
# this is here because no `Role` crd exsists yet.
|
||||||
|
# see https://github.com/cloudnative-pg/cloudnative-pg/issues/5341
|
||||||
|
managed:
|
||||||
|
roles:
|
||||||
|
- name: authentik
|
||||||
|
login: true
|
||||||
|
disablePassword: true
|
||||||
Reference in New Issue
Block a user