Run all components in one namespace
[oom.git] / kubernetes / message-router / templates / message-router-zookeeper.yaml
index c07ef3a..0dd8723 100644 (file)
@@ -1,9 +1,11 @@
+#{{ if not .Values.disableMessageRouterZookeeper }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
-  name: zookeeper
-  namespace: "{{ .Values.nsPrefix }}-message-router"
+  name: message-router-zookeeper
+  namespace: "{{ .Values.nsPrefix }}"
 spec:
+  replicas: {{ .Values.zookeeperReplicas }}
   selector:
     matchLabels:
       app: zookeeper
@@ -11,7 +13,7 @@ spec:
     metadata:
       labels:
         app: zookeeper
-      name: zookeeper
+      name: message-router-zookeeper
     spec:
       containers:
       - image: {{ .Values.image.zookeeper }}
@@ -25,12 +27,19 @@ spec:
           initialDelaySeconds: 5
           periodSeconds: 10
         volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
         - mountPath: /opt/zookeeper-3.4.9/data
           name: zookeeper-data
       restartPolicy: Always
       volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
       - name: zookeeper-data
         persistentVolumeClaim:
           claimName: message-router-zookeeper
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}