Test FTC100 fails since A1-SIM update
[nonrtric.git] / service-exposure / postgres.yaml
index 588dd8e..4bd1333 100644 (file)
@@ -53,6 +53,7 @@ apiVersion: v1
 kind: ConfigMap
 metadata:
   name: db-init
+  namespace: default
 data:
   init.sql: |
     SELECT 'CREATE DATABASE capif'
@@ -60,7 +61,7 @@ data:
     DO $$
     BEGIN
       IF NOT EXISTS (SELECT FROM pg_user WHERE  usename = 'capif') THEN
-         CREATE USER capif WITH PASSWORD 'capif'; 
+         CREATE USER capif WITH PASSWORD 'capif';
          GRANT ALL PRIVILEGES ON DATABASE capif TO capif;
       END IF;
     END
@@ -77,11 +78,11 @@ spec:
     app: postgres
   ports:
     - protocol: TCP
-      port: 5432 
+      port: 5432
       nodePort: 30032
-      targetPort: 5432 
+      targetPort: 5432
 ---
-apiVersion: apps/v1 
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: postgres
@@ -101,17 +102,17 @@ spec:
       containers:
       - image: nexus3.onap.org:10001/postgres
         name: postgres
-        imagePullPolicy: IfNotPresent 
+        imagePullPolicy: IfNotPresent
         env:
         - name: POSTGRES_DB
-          value: keycloak 
+          value: keycloak
         - name: POSTGRES_USER
-          value: keycloak 
+          value: keycloak
         - name: POSTGRES_PASSWORD
-          value: keycloak 
+          value: keycloak
         - name: PGDATA
-          value: /var/lib/pgsql/data 
-        lifecycle:  
+          value: /var/lib/pgsql/data
+        lifecycle:
           postStart:
             exec:
               command: [ "/bin/sh", "-c", "sleep 10 && psql -U $POSTGRES_USER -f /init.sql" ]
@@ -130,16 +131,16 @@ spec:
           initialDelaySeconds: 15
           timeoutSeconds: 2
         ports:
-        - containerPort: 5432 
+        - containerPort: 5432
           name: postgres
         volumeMounts:
         - name: postgres-persistent-storage
-          mountPath: /var/lib/pgsql/data 
-        - name : tmp-dir  
+          mountPath: /var/lib/pgsql/data
+        - name : tmp-dir
           mountPath: /tmp
         - name: db-init
-          mountPath: /init.sql 
-          subPath: init.sql 
+          mountPath: /init.sql
+          subPath: init.sql
       volumes:
       - name: postgres-persistent-storage
         persistentVolumeClaim:
@@ -147,7 +148,7 @@ spec:
       - name: tmp-dir
         hostPath:
           path: /tmp
-          type: Directory 
+          type: Directory
       - name: db-init
         configMap:
           name: db-init