61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: easyhaproxy
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: easyhaproxy-ingress
|
|
namespace: easyhaproxy
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: easyhaproxy-ingress
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: easyhaproxy-ingress
|
|
spec:
|
|
serviceAccountName: easyhaproxy-ingress
|
|
containers:
|
|
- image: byjg/easy-haproxy:kubernetes
|
|
imagePullPolicy: IfNotPresent
|
|
name: easyhaproxy-ingress
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
hostPort: 80
|
|
- name: https
|
|
containerPort: 443
|
|
hostPort: 443
|
|
- name: stats
|
|
containerPort: 1943
|
|
hostPort: 1943
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
#limits:
|
|
# cpu: "1"
|
|
# memory: "1Gi"
|
|
securityContext:
|
|
allowPrivilegeEscalation: true
|
|
#runAsUser: 101 #nginx
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
add:
|
|
- NET_BIND_SERVICE
|
|
env:
|
|
- name: EASYHAPROXY_DISCOVER
|
|
value: kubernetes
|
|
- name: HAPROXY_USERNAME
|
|
value: admin
|
|
- name: HAPROXY_PASSWORD
|
|
value: password
|
|
- name: EASYHAPROXY_REFRESH_CONF
|
|
value: 10
|
|
|