diff --git a/kubernetes/registry/helm/coder/coder-db-helm.yaml b/kubernetes/registry/helm/coder/coder-db-helm.yaml new file mode 100644 index 00000000..bf21a953 --- /dev/null +++ b/kubernetes/registry/helm/coder/coder-db-helm.yaml @@ -0,0 +1,26 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: coder-db + namespace: argocd +spec: + project: default + source: + chart: postgresql + repoURL: https://charts.bitnami.com/bitnami + targetRevision: 15.5.17 + helm: + valuesObject: + auth: + username: coder + password: coder + database: coder + persistence: + size: 10Gi + destination: + server: "https://kubernetes.default.svc" + namespace: coder + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/kubernetes/registry/helm/coder/postgres/config-map.yaml b/kubernetes/registry/helm/coder/postgres/config-map.yaml deleted file mode 100644 index c5bfcd11..00000000 --- a/kubernetes/registry/helm/coder/postgres/config-map.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: coder-db-configmap - namespace: coder - labels: - app: coder-db -data: - POSTGRES_DB: coder - POSTGRES_USER: coder - POSTGRES_PASSWORD: coder diff --git a/kubernetes/registry/helm/coder/postgres/deployment.yaml b/kubernetes/registry/helm/coder/postgres/deployment.yaml deleted file mode 100644 index 95120b57..00000000 --- a/kubernetes/registry/helm/coder/postgres/deployment.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: coder-db-deployment - namespace: coder -spec: - replicas: 1 - selector: - matchLabels: - app: coder-db - template: - metadata: - labels: - app: coder-db - spec: - containers: - - name: postgres - image: "postgres:16" - imagePullPolicy: IfNotPresent - ports: - - containerPort: 5432 - envFrom: - - configMapRef: - name: coder-db-configmap - env: - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: coder-db-data - volumes: - - name: coder-db-data - persistentVolumeClaim: - claimName: coder-db-pvc diff --git a/kubernetes/registry/helm/coder/postgres/pv.yaml b/kubernetes/registry/helm/coder/postgres/pv.yaml deleted file mode 100644 index 34f7aae1..00000000 --- a/kubernetes/registry/helm/coder/postgres/pv.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: coder-db-pv - namespace: coder - labels: - type: local - app: coder -spec: - capacity: - storage: 10Gi - accessModes: - - ReadWriteMany - hostPath: - path: /mnt/storage/coder-db diff --git a/kubernetes/registry/helm/coder/postgres/pvc.yaml b/kubernetes/registry/helm/coder/postgres/pvc.yaml deleted file mode 100644 index d6c7b481..00000000 --- a/kubernetes/registry/helm/coder/postgres/pvc.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: coder-db-pvc - namespace: coder - labels: - app: coder -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: 10Gi diff --git a/kubernetes/registry/helm/coder/postgres/service.yaml b/kubernetes/registry/helm/coder/postgres/service.yaml deleted file mode 100644 index 1fd2a1a6..00000000 --- a/kubernetes/registry/helm/coder/postgres/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: coder-db-svc - namespace: coder - labels: - app: coder -spec: - type: LoadBalancer - ports: - - port: 5432 - selector: - app: coder