Use domain name instead of IP for consul
[oom.git] / kubernetes / msb / templates / msb-discovery-deployment.yaml
index e4736b5..3af9e8f 100644 (file)
@@ -2,8 +2,9 @@ apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
   name: msb-discovery
+  namespace: "{{ .Values.nsPrefix }}-msb"
 spec:
-  replicas: 2
+  replicas: {{ .Values.discoveryReplicas }}
   selector:
     matchLabels:
       app: msb-discovery
@@ -16,19 +17,20 @@ spec:
       hostname: msb-discovery
       containers:
       - args:
-        image:  nexus3.onap.org:10001/onap/msb/msb_discovery
+        image:  {{ .Values.image.discovery }}
         name: "msb-discovery"
         env:
         - name: CONSUL_IP
-          value: "{{ .Values.consulClusterIP }}"
+          value: msb-consul.{{ .Values.nsPrefix }}-msb
         ports:
-        - containerPort: 10081
+        - containerPort: {{ .Values.discoveryPort }}
           name: msb-discovery
         readinessProbe:
           tcpSocket:
-            port: 10081
+            port: {{ .Values.discoveryPort }}
           initialDelaySeconds: 5
           periodSeconds: 10
-        imagePullPolicy: "{{ .Values.pullPolicy }}"
-
+        imagePullPolicy: {{ .Values.pullPolicy }}
+      imagePullSecrets:
+      - name: "{{ .Values.nsPrefix }}-docker-registry-key"