postgres yaml files modified
[ealt-edge.git] / ocd / infra / playbooks / roles / applcm / files / deploy / postgres-k8s.yaml
index 82e2921..3846778 100644 (file)
@@ -32,38 +32,19 @@ spec:
       labels:
         app: postgres-db
     spec:
-      volumes:
-        - name: postgres-data
-          persistentVolumeClaim:
-            claimName: postgres-pv-claim
       containers:
-        - name: postgres-db
-          image: postgres:9.6
-          imagePullPolicy: "IfNotPresent"
-          env:
-            - name: POSTGRES_DB
-              value: mecmdb
-            - name: POSTGRES_USER
-              value: root
-            - name: POSTGRES_PASSWORD
-              value: password
+        - name: postgres
+          image: postgres:13
+          imagePullPolicy: "Always"
+          envFrom:
+            - configMapRef:
+                name: postgres-config
           volumeMounts:
             - mountPath: /var/lib/postgresql/data
-              name: postgres-data
+              name: postgredb
           ports:
             - containerPort: 5432
-
-# postgres service
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: mecmdb
-  namespace: default
-spec:
-  selector:
-    app: postgres-db
-  ports:
-    - name: "5432"
-      port: 5432
-      targetPort: 5432
+      volumes:
+        - name: postgredb
+          persistentVolumeClaim:
+            claimName: postgres-pv-claim