diff --git a/manifests/02-deployments/deployment-pgadmin.yaml b/manifests/02-deployments/deployment-pgadmin.yaml index 482db2b..68f7fe2 100644 --- a/manifests/02-deployments/deployment-pgadmin.yaml +++ b/manifests/02-deployments/deployment-pgadmin.yaml @@ -15,18 +15,60 @@ spec: app: pgadmin spec: containers: - - name: pgadmin4 - image: dpage/pgadmin4 - env: - - name: PGADMIN_DEFAULT_EMAIL - value: "admin@guaranteedstruggle.host" - - name: PGADMIN_DEFAULT_PASSWORD - valueFrom: - secretKeyRef: - name: pgadmin-secret - key: pgadmin-default-password - - name: PGADMIN_PORT - value: "80" - ports: - - containerPort: 80 - name: pgadminport \ No newline at end of file + - name: pgadmin4 + image: dpage/pgadmin4 + env: + - name: PGADMIN_DEFAULT_EMAIL + value: "admin@guaranteedstruggle.host" + - name: PGADMIN_DEFAULT_PASSWORD + valueFrom: + secretKeyRef: + name: pgadmin-secret + key: pgadmin-default-password + - name: PGADMIN_PORT + value: "80" + + ports: + - containerPort: 80 + name: pgadminport + + volumeMounts: + - mountPath: /var/lib/pgadmin + name: pgadmin + + volumes: + - name: pgadmin + persistentVolumeClaim: + claimName: pgadmin-pv-claim +--- +kind: PersistentVolume +apiVersion: v1 +metadata: + namespace: pg + name: pgadmin-pv-volume + labels: + type: local + app: pgadmin +spec: + storageClassName: longhorn + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + hostPath: + path: "/mnt/data" +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + namespace: pg + name: pgadmin-pv-claim + labels: + app: pgadmin +spec: + storageClassName: longhorn + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi \ No newline at end of file