Provision Matrix PostgreSQL with CloudNativePG
This commit is contained in:
1 parent
6b70792559
commit
026daf1753
8 files changed
+105
No files matched your search
@@ -0,0 +1,20 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: matrix-cnpg
|
||||
namespace: matrix
|
||||
spec:
|
||||
instances: 1
|
||||
enableSuperuserAccess: true
|
||||
imageName: ghcr.io/cloudnative-pg/postgresql:18.6-standard-trixie
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values: [odroid-h3-00]
|
||||
storage:
|
||||
size: 200Gi
|
||||
storageClass: rook-ceph-block
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cluster.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- service.yaml
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgresql
|
||||
namespace: matrix
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: postgresql
|
||||
port: 5432
|
||||
protocol: TCP
|
||||
targetPort: 5432
|
||||
selector:
|
||||
cnpg.io/cluster: matrix-cnpg
|
||||
cnpg.io/instanceRole: primary
|
||||
Reference in new issue
Block a user