Replace operator with deployment
This commit is contained in:
parent
d7f2130b2e
commit
8c51525410
2 changed files with 65 additions and 75 deletions
|
@ -177,27 +177,3 @@ spec:
|
||||||
- name: vaultwarden-data
|
- name: vaultwarden-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: vaultwarden-pvc
|
claimName: vaultwarden-pvc
|
||||||
---
|
|
||||||
apiVersion: acid.zalan.do/v1
|
|
||||||
kind: postgresql
|
|
||||||
metadata:
|
|
||||||
name: vwdb
|
|
||||||
namespace: home-server
|
|
||||||
spec:
|
|
||||||
teamId: "acid"
|
|
||||||
volume:
|
|
||||||
size: 2Gi
|
|
||||||
numberOfInstances: 1
|
|
||||||
users:
|
|
||||||
vaultwarden_user:
|
|
||||||
- login
|
|
||||||
databases:
|
|
||||||
vaultwarden: vaultwarden_user
|
|
||||||
postgresql:
|
|
||||||
version: "15"
|
|
||||||
usersFromSecret:
|
|
||||||
vaultwarden_user:
|
|
||||||
secretName: vaultwarden-db-credentials
|
|
||||||
secretKeyUsername: username
|
|
||||||
secretKeyPassword: password
|
|
||||||
|
|
||||||
|
|
|
@ -1,68 +1,82 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: zalando-postgres-operator
|
name: postgres
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
apiVersion: v1
|
||||||
kind: HelmRepository
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres-operator-charts
|
name: postgres-pv
|
||||||
namespace: flux-system
|
namespace: postgres
|
||||||
spec:
|
spec:
|
||||||
interval: 1h
|
capacity:
|
||||||
url: https://opensource.zalando.com/postgres-operator/charts/postgres-operator
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: local-path
|
||||||
|
hostPath:
|
||||||
|
path: /dpool/services/postgres/data
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
apiVersion: v1
|
||||||
kind: HelmRelease
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres-operator
|
name: postgres-pvc
|
||||||
namespace: zalando-postgres-operator
|
namespace: postgres
|
||||||
spec:
|
spec:
|
||||||
interval: 30m
|
accessModes:
|
||||||
chart:
|
- ReadWriteOnce
|
||||||
|
storageClassName: local-path
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
volumeName: postgres-pv
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: postgres
|
||||||
|
namespace: postgres
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: postgres
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: postgres
|
||||||
spec:
|
spec:
|
||||||
chart: postgres-operator
|
containers:
|
||||||
version: 1.10.1 # Optional: adjust if newer versions become available
|
- name: postgres
|
||||||
sourceRef:
|
image: postgres:15
|
||||||
kind: HelmRepository
|
ports:
|
||||||
name: postgres-operator-charts
|
- containerPort: 5432
|
||||||
namespace: flux-system
|
envFrom:
|
||||||
install:
|
- secretRef:
|
||||||
createNamespace: true
|
name: postgres-secret
|
||||||
values:
|
volumeMounts:
|
||||||
configGeneral:
|
- name: postgres-data
|
||||||
enable_crd_registration: true
|
mountPath: /var/lib/postgresql/data
|
||||||
watched_namespaces: "*"
|
volumes:
|
||||||
|
- name: postgres-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: postgres-pvc
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
apiVersion: v1
|
||||||
kind: HelmRepository
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres-operator-ui-charts
|
name: postgres
|
||||||
namespace: flux-system
|
namespace: postgres
|
||||||
spec:
|
spec:
|
||||||
interval: 1h
|
selector:
|
||||||
url: https://opensource.zalando.com/postgres-operator/charts/postgres-operator-ui
|
app: postgres
|
||||||
|
ports:
|
||||||
---
|
- port: 5432
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
targetPort: 5432
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgres-operator-ui
|
|
||||||
namespace: zalando-postgres-operator
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgres-operator-ui
|
|
||||||
version: 1.10.1 # Optional: update based on available version
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: postgres-operator-ui-charts
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
createNamespace: true
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue