First Kubernetes implementation
This commit is contained in:
parent
eb5f7e313f
commit
bbf3dca6fd
5 changed files with 183 additions and 22 deletions
61
kubernetes/easyhaproxy.yml
Normal file
61
kubernetes/easyhaproxy.yml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue