blob: 7dfef0029bd4750e7bdb8d782788dec357de595d [file] [log] [blame]
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: consul
namespace: openwhisk
labels:
name: consul
spec:
replicas: 1
template:
metadata:
labels:
name: consul
spec:
restartPolicy: Always
volumes:
- name: dockersock
hostPath:
path: /var/run/docker.sock
- name: consulconf
configMap:
name: consul
containers:
- name: consul
imagePullPolicy: IfNotPresent
image: consul:v0.7.0
ports:
- name: server
protocol: TCP
containerPort: 8300
hostPort: 8300
- name: serflan-tcp
protocol: TCP
containerPort: 8301
hostPort: 8301
- name: serflan-udp
protocol: UDP
containerPort: 8301
hostPort: 8301
- name: serfwan-tcp
protocol: TCP
containerPort: 8302
hostPort: 8302
- name: serfwan-udp
protocol: UDP
containerPort: 8302
hostPort: 8302
- name: rpc
protocol: TCP
containerPort: 8400
hostPort: 8400
- name: http
protocol: TCP
containerPort: 8500
hostPort: 8500
- name: consuldns-tcp
protocol: TCP
containerPort: 8600
hostPort: 8600
- name: consuldns-udp
protocol: UDP
containerPort: 8600
hostPort: 8600
volumeMounts:
- name: consulconf
mountPath: "/consul/config/config.json"
- name: registrator
image: gliderlabs/registrator
env:
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
args: [ "-ip", "$(MY_POD_IP)", "-resync", "2", "consul://$(MY_POD_IP):8500" ]
volumeMounts:
- name: dockersock
mountPath: "/tmp/docker.sock"