Skip to content

Commit fa9a976

Browse files
committed
Add ClusterIP and NodePort deployment
1 parent 98c1114 commit fa9a976

10 files changed

+525
-31
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ venv
44
.docker_data
55
__pycache__
66
.pytest_cache
7-
*.pyc
7+
*.pyc
8+
.env
+208
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
---
2+
# Source: easyhaproxy/templates/serviceaccount.yaml
3+
apiVersion: v1
4+
kind: ServiceAccount
5+
metadata:
6+
name: ingress-easyhaproxy
7+
namespace: easyhaproxy
8+
labels:
9+
helm.sh/chart: easyhaproxy-0.1.2
10+
app.kubernetes.io/name: easyhaproxy
11+
app.kubernetes.io/instance: ingress
12+
app.kubernetes.io/version: "test"
13+
app.kubernetes.io/managed-by: Helm
14+
---
15+
# Source: easyhaproxy/templates/clusterrole.yaml
16+
kind: ClusterRole
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
metadata:
19+
name: ingress-easyhaproxy
20+
namespace: easyhaproxy
21+
labels:
22+
helm.sh/chart: easyhaproxy-0.1.2
23+
app.kubernetes.io/name: easyhaproxy
24+
app.kubernetes.io/instance: ingress
25+
app.kubernetes.io/version: "test"
26+
app.kubernetes.io/managed-by: Helm
27+
rules:
28+
- apiGroups:
29+
- ""
30+
resources:
31+
# - configmaps
32+
# - endpoints
33+
# - nodes
34+
- pods
35+
- services
36+
- namespaces
37+
# - events
38+
- serviceaccounts
39+
verbs:
40+
- get
41+
- list
42+
- watch
43+
- apiGroups:
44+
- "extensions"
45+
- "networking.k8s.io"
46+
resources:
47+
- ingresses
48+
# - ingresses/status
49+
# - ingressclasses
50+
verbs:
51+
- get
52+
- list
53+
- watch
54+
# - apiGroups:
55+
# - "extensions"
56+
# - "networking.k8s.io"
57+
# resources:
58+
# - ingresses/status
59+
# verbs:
60+
# - update
61+
- apiGroups:
62+
- ""
63+
resources:
64+
- secrets
65+
verbs:
66+
- get
67+
- list
68+
# - watch
69+
# - create
70+
# - patch
71+
# - update
72+
# - apiGroups:
73+
# - "discovery.k8s.io"
74+
# resources:
75+
# - endpointslices
76+
# verbs:
77+
# - get
78+
# - list
79+
# - watch
80+
---
81+
# Source: easyhaproxy/templates/clusterrolebinding.yaml
82+
kind: ClusterRoleBinding
83+
apiVersion: rbac.authorization.k8s.io/v1
84+
metadata:
85+
name: ingress-easyhaproxy
86+
namespace: easyhaproxy
87+
labels:
88+
helm.sh/chart: easyhaproxy-0.1.2
89+
app.kubernetes.io/name: easyhaproxy
90+
app.kubernetes.io/instance: ingress
91+
app.kubernetes.io/version: "test"
92+
app.kubernetes.io/managed-by: Helm
93+
roleRef:
94+
apiGroup: rbac.authorization.k8s.io
95+
kind: ClusterRole
96+
name: ingress-easyhaproxy
97+
subjects:
98+
- kind: ServiceAccount
99+
name: ingress-easyhaproxy
100+
namespace: easyhaproxy
101+
---
102+
# Source: easyhaproxy/templates/service.yaml
103+
apiVersion: v1
104+
kind: Service
105+
metadata:
106+
metadata:
107+
name: ingress-easyhaproxy
108+
namespace: easyhaproxy
109+
labels:
110+
helm.sh/chart: easyhaproxy-0.1.2
111+
app.kubernetes.io/name: easyhaproxy
112+
app.kubernetes.io/instance: ingress
113+
app.kubernetes.io/version: "test"
114+
app.kubernetes.io/managed-by: Helm
115+
annotations:
116+
{}
117+
spec:
118+
type: ClusterIP
119+
ports:
120+
- name: http
121+
port: 80
122+
123+
- name: https
124+
port: 443
125+
126+
- name: stats
127+
port: 1936
128+
129+
130+
131+
selector:
132+
app.kubernetes.io/name: easyhaproxy
133+
app.kubernetes.io/instance: ingress
134+
---
135+
# Source: easyhaproxy/templates/deployment.yaml
136+
apiVersion: apps/v1
137+
kind: Deployment
138+
metadata:
139+
name: ingress-easyhaproxy
140+
namespace: easyhaproxy
141+
labels:
142+
helm.sh/chart: easyhaproxy-0.1.2
143+
app.kubernetes.io/name: easyhaproxy
144+
app.kubernetes.io/instance: ingress
145+
app.kubernetes.io/version: "test"
146+
app.kubernetes.io/managed-by: Helm
147+
spec:
148+
selector:
149+
matchLabels:
150+
app.kubernetes.io/name: easyhaproxy
151+
app.kubernetes.io/instance: ingress
152+
template:
153+
metadata:
154+
labels:
155+
app.kubernetes.io/name: easyhaproxy
156+
app.kubernetes.io/instance: ingress
157+
spec:
158+
affinity:
159+
nodeAffinity:
160+
requiredDuringSchedulingIgnoredDuringExecution:
161+
nodeSelectorTerms:
162+
- matchExpressions:
163+
- key: easyhaproxy/node
164+
operator: In
165+
values:
166+
- master
167+
serviceAccountName: ingress-easyhaproxy
168+
securityContext:
169+
{}
170+
containers:
171+
- name: easyhaproxy
172+
securityContext:
173+
{}
174+
image: "byjg/easy-haproxy:test"
175+
imagePullPolicy: Always
176+
ports:
177+
- name: http
178+
containerPort: 80
179+
180+
- name: https
181+
containerPort: 443
182+
183+
- name: stats
184+
containerPort: 1936
185+
186+
resources:
187+
requests:
188+
cpu: 100m
189+
memory: 128Mi
190+
env:
191+
- name: EASYHAPROXY_DISCOVER
192+
value: kubernetes
193+
- name: HAPROXY_USERNAME
194+
value: admin
195+
- name: HAPROXY_PASSWORD
196+
value: password
197+
- name: EASYHAPROXY_REFRESH_CONF
198+
value: "10"
199+
- name: HAPROXY_CUSTOMERRORS
200+
value: "true"
201+
- name: EASYHAPROXY_SSL_MODE
202+
value: loose
203+
- name: EASYHAPROXY_LOG_LEVEL
204+
value: DEBUG
205+
- name: HAPROXY_LOG_LEVEL
206+
value: DEBUG
207+
- name: CERTBOT_LOG_LEVEL
208+
value: DEBUG

deploy/kubernetes/easyhaproxy.yml renamed to deploy/kubernetes/easyhaproxy-daemonset.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
name: ingress-easyhaproxy
77
namespace: easyhaproxy
88
labels:
9-
helm.sh/chart: easyhaproxy-0.1.0
9+
helm.sh/chart: easyhaproxy-0.1.2
1010
app.kubernetes.io/name: easyhaproxy
1111
app.kubernetes.io/instance: ingress
1212
app.kubernetes.io/version: "test"
@@ -19,7 +19,7 @@ metadata:
1919
name: ingress-easyhaproxy
2020
namespace: easyhaproxy
2121
labels:
22-
helm.sh/chart: easyhaproxy-0.1.0
22+
helm.sh/chart: easyhaproxy-0.1.2
2323
app.kubernetes.io/name: easyhaproxy
2424
app.kubernetes.io/instance: ingress
2525
app.kubernetes.io/version: "test"
@@ -85,7 +85,7 @@ metadata:
8585
name: ingress-easyhaproxy
8686
namespace: easyhaproxy
8787
labels:
88-
helm.sh/chart: easyhaproxy-0.1.0
88+
helm.sh/chart: easyhaproxy-0.1.2
8989
app.kubernetes.io/name: easyhaproxy
9090
app.kubernetes.io/instance: ingress
9191
app.kubernetes.io/version: "test"
@@ -106,7 +106,7 @@ metadata:
106106
name: ingress-easyhaproxy
107107
namespace: easyhaproxy
108108
labels:
109-
helm.sh/chart: easyhaproxy-0.1.0
109+
helm.sh/chart: easyhaproxy-0.1.2
110110
app.kubernetes.io/name: easyhaproxy
111111
app.kubernetes.io/instance: ingress
112112
app.kubernetes.io/version: "test"
@@ -151,7 +151,9 @@ spec:
151151
containerPort: 1936
152152
hostPort: 1936
153153
resources:
154-
{}
154+
requests:
155+
cpu: 100m
156+
memory: 128Mi
155157
env:
156158
- name: EASYHAPROXY_DISCOVER
157159
value: kubernetes
@@ -170,4 +172,4 @@ spec:
170172
- name: HAPROXY_LOG_LEVEL
171173
value: DEBUG
172174
- name: CERTBOT_LOG_LEVEL
173-
value: DEBUG
175+
value: DEBUG

0 commit comments

Comments
 (0)