forked from k-space/kube
Clean up operatorlib related stuff
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Postgres clusters
|
||||
|
||||
This is namespace for Postgres clusters managed by operator-bundle
|
||||
This is namespace for Postgres clusters managed by Codemowers' sample
|
||||
[postgres-database-operator](https://github.com/codemowers/operatorlib/tree/main/samples/postgres-database-operator)
|
||||
which is deployed via [ArgoCD](https://argocd.k-space.ee/applications/argocd/postgres-database-operator)
|
||||
|
||||
```
|
||||
kubectl create namespace postgres-clusters
|
||||
|
23
postgres-clusters/dedicated.yaml
Normal file
23
postgres-clusters/dedicated.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
apiVersion: codemowers.cloud/v1beta1
|
||||
kind: PostgresDatabaseClass
|
||||
metadata:
|
||||
name: dedicated
|
||||
annotations:
|
||||
kubernetes.io/description: "Dedicated Postgres cluster"
|
||||
spec:
|
||||
reclaimPolicy: Retain
|
||||
replicas: 3
|
||||
storageClass: postgres
|
||||
podSpec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:13.11@sha256:0f18de936266e03891e186db616e530e0e4365ef5fb300d4bb27318538b80604
|
||||
imagePullPolicy: IfNotPresent
|
||||
nodeSelector:
|
||||
dedicated: storage
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: dedicated
|
||||
operator: Equal
|
||||
value: storage
|
@@ -1,43 +1,4 @@
|
||||
---
|
||||
apiVersion: codemowers.io/v1alpha1
|
||||
kind: ClusterPostgresDatabaseClass
|
||||
metadata:
|
||||
name: dedicated
|
||||
spec:
|
||||
targetNamespace: postgres-clusters
|
||||
description: "Dedicated Postgres cluster"
|
||||
replicas: 3
|
||||
routers: 2
|
||||
storageClass: postgres
|
||||
podSpec:
|
||||
nodeSelector:
|
||||
dedicated: storage
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: dedicated
|
||||
operator: Equal
|
||||
value: storage
|
||||
---
|
||||
apiVersion: codemowers.io/v1alpha1
|
||||
kind: ClusterPostgresDatabaseClass
|
||||
metadata:
|
||||
name: shared
|
||||
spec:
|
||||
targetCluster: shared
|
||||
targetNamespace: postgres-clusters
|
||||
description: "Shared Postgres cluster"
|
||||
replicas: 3
|
||||
routers: 2
|
||||
storageClass: postgres
|
||||
podSpec:
|
||||
nodeSelector:
|
||||
dedicated: storage
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: dedicated
|
||||
operator: Equal
|
||||
value: storage
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -74,6 +35,16 @@ spec:
|
||||
port: 8081
|
||||
targetPort: 8081
|
||||
---
|
||||
apiVersion: codemowers.io/v1alpha1
|
||||
kind: OIDCGWMiddlewareClient
|
||||
metadata:
|
||||
name: pgweb
|
||||
spec:
|
||||
displayName: pgweb
|
||||
uri: 'https://pgweb.k-space.ee'
|
||||
allowedGroups:
|
||||
- k-space:floor
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
@@ -84,7 +55,7 @@ metadata:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
||||
traefik.ingress.kubernetes.io/router.middlewares: postgres-clusters-pgweb@kubernetescrd
|
||||
spec:
|
||||
rules:
|
||||
- host: pgweb.k-space.ee
|
24
postgres-clusters/shared.yaml
Normal file
24
postgres-clusters/shared.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
apiVersion: codemowers.cloud/v1beta1
|
||||
kind: PostgresDatabaseClass
|
||||
metadata:
|
||||
name: shared
|
||||
annotations:
|
||||
kubernetes.io/description: "Shared Postgres cluster"
|
||||
spec:
|
||||
reclaimPolicy: Retain
|
||||
shared: true
|
||||
replicas: 3
|
||||
storageClass: postgres
|
||||
podSpec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:13.11@sha256:0f18de936266e03891e186db616e530e0e4365ef5fb300d4bb27318538b80604
|
||||
imagePullPolicy: IfNotPresent
|
||||
nodeSelector:
|
||||
dedicated: storage
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: dedicated
|
||||
operator: Equal
|
||||
value: storage
|
11
postgres-clusters/storageclass.yaml
Normal file
11
postgres-clusters/storageclass.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: postgres
|
||||
provisioner: rawfile.csi.openebs.io
|
||||
reclaimPolicy: Retain
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
allowVolumeExpansion: true
|
||||
parameters:
|
||||
fsType: "xfs"
|
Reference in New Issue
Block a user