-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes-controller.yaml
61 lines (61 loc) · 1.43 KB
/
kubernetes-controller.yaml
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
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: deployment-metadata-reader
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: deployment-metadata-reader-role
rules:
- apiGroups:
- ""
- apps
resources:
- deployments
verbs:
- list
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: deployment-metadata-reader:deployment-metadata-reader-role
roleRef:
kind: ClusterRole
name: deployment-metadata-reader-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: deployment-metadata-reader
namespace: default
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: k8s-controller-nginx-label-reconciler
spec:
selector:
matchLabels:
app: k8s-controller-nginx-label-reconciler
template:
metadata:
labels:
app: k8s-controller-nginx-label-reconciler
spec:
serviceAccountName: deployment-metadata-reader
containers:
- name: k8s-controller-nginx-label-reconciler
image: k3d-registry.localhost:5000/com.github.agabrys/kubernetes-controller:latest
env:
- name: LABEL_NAME
value: app
- name: LABEL_VALUE
value: nginx
- name: COUNTER_SERVICE_URL
value: http://counter-service.default.svc.cluster.local/counter
resources:
limits:
memory: "128Mi"
cpu: "500m"