Run all components in one namespace
[oom.git] / kubernetes / consul / templates / consul-server-deployment.yaml
index 3e6dcba..c9f2cfb 100644 (file)
@@ -1,10 +1,11 @@
+#{{ if not .Values.disableConsulConsulServer }}
 apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
   labels:
     app: consul-server
   name: consul-server
-  namespace: "{{ .Values.nsPrefix }}-consul"
+  namespace: "{{ .Values.nsPrefix }}"
 spec:
   replicas: 3
   selector:
@@ -19,12 +20,13 @@ spec:
       containers:
       - image: "{{ .Values.consulimageRegistry }}:{{ .Values.consuldockerTag }}"
         command: ["/usr/local/bin/docker-entrypoint.sh"]
-        args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","consul-server.{{ .Values.nsPrefix }}-consul"]
+        args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","consul-server.{{ .Values.nsPrefix }}"]
         name: consul-server
         volumeMounts:
         - mountPath: /consul/config
           name: consul-server-config
       volumes:
       - hostPath:
-          path: {{ .Values.rootHostPath }}/{{ .Values.rootHostPath }}/{{ .Values.nsPrefix }}/consul/consul-server-config
+          path: {{ .Values.rootHostPath }}/{{ .Values.nsPrefix }}/consul/consul-server-config
         name: consul-server-config
+#{{ end }}