-
Notifications
You must be signed in to change notification settings - Fork 62
/
deploy.yml
162 lines (146 loc) · 2.91 KB
/
deploy.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
apiVersion: v1
kind: Namespace
metadata:
name: hairpin-proxy
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hairpin-proxy-haproxy
name: hairpin-proxy-haproxy
namespace: hairpin-proxy
spec:
replicas: 1
selector:
matchLabels:
app: hairpin-proxy-haproxy
template:
metadata:
labels:
app: hairpin-proxy-haproxy
spec:
containers:
- image: compumike/hairpin-proxy-haproxy:0.2.1
name: main
resources:
requests:
memory: "100Mi"
cpu: "10m"
limits:
memory: "200Mi"
cpu: "50m"
---
apiVersion: v1
kind: Service
metadata:
name: hairpin-proxy
namespace: hairpin-proxy
spec:
selector:
app: hairpin-proxy-haproxy
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
- name: https
protocol: TCP
port: 443
targetPort: 443
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: hairpin-proxy-controller-sa
namespace: hairpin-proxy
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: hairpin-proxy-controller-cr
rules:
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: hairpin-proxy-controller-crb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: hairpin-proxy-controller-cr
subjects:
- kind: ServiceAccount
name: hairpin-proxy-controller-sa
namespace: hairpin-proxy
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: hairpin-proxy-controller-r
namespace: kube-system
rules:
- apiGroups: [""]
resources:
- configmaps
resourceNames:
- coredns
verbs:
- get
- watch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: hairpin-proxy-controller-rb
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: hairpin-proxy-controller-r
subjects:
- kind: ServiceAccount
name: hairpin-proxy-controller-sa
namespace: hairpin-proxy
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hairpin-proxy-controller
name: hairpin-proxy-controller
namespace: hairpin-proxy
spec:
replicas: 1
selector:
matchLabels:
app: hairpin-proxy-controller
template:
metadata:
labels:
app: hairpin-proxy-controller
spec:
serviceAccountName: hairpin-proxy-controller-sa
securityContext:
runAsUser: 405
runAsGroup: 65533
containers:
- image: compumike/hairpin-proxy-controller:0.2.1
name: main
resources:
requests:
memory: "50Mi"
cpu: "10m"
limits:
memory: "100Mi"
cpu: "50m"