From cc2decc957e7cbb2936fa4a8730bf5baa6c21c61 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 10 May 2019 14:50:55 +0200 Subject: wip --- k8s/db.yaml | 5 +++-- k8s/mi.yaml | 67 ++++++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 56 insertions(+), 16 deletions(-) (limited to 'k8s') diff --git a/k8s/db.yaml b/k8s/db.yaml index e62ff52..e97ca94 100644 --- a/k8s/db.yaml +++ b/k8s/db.yaml @@ -4,5 +4,6 @@ kind: Secret metadata: name: membership-import-admin data: - username: cG9zdGdyZXM= - password: ZGlxODJ5REQ3b3hFSVA1Zw== + # mi-gateway + username: bWktZ2F0ZXdheQ== + password: bWktZ2F0ZXdheQ== diff --git a/k8s/mi.yaml b/k8s/mi.yaml index 2d1dcb7..43d6adf 100644 --- a/k8s/mi.yaml +++ b/k8s/mi.yaml @@ -17,13 +17,36 @@ spec: image: trygvis/mi-processor:latest ports: - containerPort: 8080 - volumeMounts: - - name: pgpass - mountPath: /secret/pgpass - volumes: - - name: pgpass - secret: - secretName: membership-import-admin + +# volumeMounts: +# - name: pgpass +# mountPath: /secret/pgpass +# volumes: +# - name: pgpass +# secret: +# secretName: membership-import-admin + +--- +kind: Service +apiVersion: v1 +metadata: + name: pg +spec: + type: ClusterIP + ports: + - port: 5432 + targetPort: 5432 + +--- +kind: Endpoints +apiVersion: v1 +metadata: + name: pg +subsets: + - addresses: + - ip: 10.88.80.3 + ports: + - port: 5432 --- apiVersion: apps/v1 @@ -45,13 +68,29 @@ spec: image: trygvis/mi-gateway:latest ports: - containerPort: 8080 - volumeMounts: - - name: pgpass - mountPath: /secret/pgpass - volumes: - - name: pgpass - secret: - secretName: membership-import-admin + env: + - name: PGDATABASE + value: iqey + - name: PGUSER + valueFrom: + secretKeyRef: + name: membership-import-admin + key: username + - name: PGPASSWORD + valueFrom: + secretKeyRef: + name: membership-import-admin + key: password + - name: PGHOST + value: pg.default.svc.cluster.local + +# volumeMounts: +# - name: pgpass +# mountPath: /secret/pgpass +# volumes: +# - name: pgpass +# secret: +# secretName: membership-import-admin --- apiVersion: v1 -- cgit v1.2.3