forked from webofmars/hairpin-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yml
138 lines (136 loc) · 2.56 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
apiVersion: v1
kind: Namespace
metadata:
name: hairpin-proxy
---
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
- apiGroups: [""]
resources:
- services
verbs:
- get
- list
- watch
- apiGroups: [""]
resources:
- configmaps
verbs:
- get
- list
- watch
- update
---
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: hairpin-proxy
rules:
- apiGroups: [""]
resources:
- configmaps
verbs:
- get
- list
- watch
- update
- apiGroups: [""]
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups: ["apps"]
resources:
- deployments
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: hairpin-proxy-controller-rb
namespace: hairpin-proxy
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: ghcr.io/q-m/hairpin-proxy-controller:0.5.2
name: main
resources:
requests:
memory: "50Mi"
cpu: "10m"
limits:
memory: "100Mi"
cpu: "50m"