aboutsummaryrefslogtreecommitdiff
path: root/k8s
diff options
context:
space:
mode:
Diffstat (limited to 'k8s')
-rw-r--r--k8s/db.yaml5
-rw-r--r--k8s/mi.yaml67
2 files changed, 56 insertions, 16 deletions
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