forked from paulgmiller/corednsprobe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.yaml
More file actions
62 lines (61 loc) · 1.38 KB
/
deploy.yaml
File metadata and controls
62 lines (61 loc) · 1.38 KB
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
# ServiceAccount: gives the pod an identity
apiVersion: v1
kind: ServiceAccount
metadata:
name: coredns-probe
namespace: kube-system
---
# Role: allows read‑only access to EndpointSlices (and Endpoints for safety)
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: coredns-probe
namespace: kube-system
rules:
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get", "list", "watch"]
---
# RoleBinding: binds the Role to the ServiceAccount
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: coredns-probe
namespace: kube-system
subjects:
- kind: ServiceAccount
name: coredns-probe
namespace: kube-system
roleRef:
kind: Role
name: coredns-probe
apiGroup: rbac.authorization.k8s.io
---
# Deployment: runs a single, lightweight probe pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: coredns-probe
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: coredns-probe
template:
metadata:
labels:
app: coredns-probe
spec:
serviceAccountName: coredns-probe
containers:
- name: probe
image: paulgmiller/corednsprobe:d80b1c0
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: 20m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi