/
haproxy-controller.yaml
38 lines (38 loc) · 1.04 KB
/
haproxy-controller.yaml
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
33
34
35
36
37
38
apiVersion: v1
kind: ReplicationController
metadata:
name: haproxy-pyconfd
spec:
replicas: 2
selector:
name: haproxy-pyconfd
template:
metadata:
labels:
name: haproxy-pyconfd
spec:
nodeSelector:
node_role: 'haproxy'
containers:
- name: haproxy-pyconfd
image: haproxy/pyconfd:latest
# Once we get our registry running, remove this line to have the kubelet
# always retrieve the latest image and not settle with the local version
imagePullPolicy: IfNotPresent
env:
- name: SSL_KEY_FILE
value: /etc/pyconfd/admin1-key.pem
- name: SSL_CERT_FILE
value: /etc/pyconfd/admin1.pem
- name: SSL_CA_FILE
value: /etc/pyconfd/ca.pem
- name: LOGLEVEL
value: DEBUG
- name: APISERVERS
value: "https://kubernetes"
securityContext:
privileged: true
ports:
- containerPort: 80
- containerPort: 443
- containerPort: 6379