Replica Scaling of Consul and Log container
[oom.git] / kubernetes / consul / templates / consul-agent-deployment.yaml
1 #{{ if not .Values.disableConsulConsulAgent }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: consul-agent
7   name: consul-agent
8   namespace: "{{ .Values.nsPrefix }}"
9 spec:
10   replicas: {{ .Values.consulAgentReplicas }}
11   selector:
12     matchLabels:
13       app: consul-agent
14   template:
15     metadata:
16       labels:
17         app: consul-agent
18       name: consul-agent
19     spec:
20       containers:
21       - image: "{{ .Values.consulimageRegistry }}:{{ .Values.consuldockerTag }}"
22         command: ["/usr/local/bin/docker-entrypoint.sh"]
23         args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","consul-server.{{ .Values.nsPrefix }}"]
24         name: consul-server
25         volumeMounts:
26         - mountPath: /consul/config
27           name: consul-agent-config
28       volumes:
29       - hostPath:
30           path: {{ .Values.rootHostPath }}/{{ .Values.nsPrefix }}/consul/consul-agent-config
31         name: consul-agent-config
32 #{{ end }}