aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/consul/templates/consul-server-deployment.yaml
blob: 6aafee4cb2005d735dd4c28ac62572a6a8dd8f58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#{{ if not .Values.disableConsulConsulServer }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: consul-server
  name: consul-server
  namespace: "{{ .Values.nsPrefix }}"
spec:
  replicas: {{ .Values.consulServerReplicas }}
  selector:
    matchLabels:
      app: consul-server
  template:
    metadata:
      labels:
        app: consul-server
      name: consul-server
    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 }}"]
        name: consul-server
        volumeMounts:
        - mountPath: /consul/config
          name: consul-server-config
      volumes:
      - hostPath:
          path: {{ .Values.rootHostPath }}/{{ .Values.nsPrefix }}/consul/consul-server-config
        name: consul-server-config
#{{ end }}