-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrbac-presync-monitoring.yaml
80 lines (80 loc) · 1.97 KB
/
rbac-presync-monitoring.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: image-puller-tools
namespace: rhods-notebooks
labels:
k8s-app: image-puller
annotations:
# argocd.argoproj.io/sync-wave: "2"
argocd.argoproj.io/hook: PreSync
spec:
selector:
matchLabels:
name: image-puller
template:
metadata:
labels:
name: image-puller
spec:
containers:
- name: tools
image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
limits:
memory: 20Mi
requests:
cpu: 10m
memory: 10Mi
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: presync-monitoring-sa
namespace: redhat-ods-operator
annotations:
# argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/hook: PreSync
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: presync-monitoring-cluster-role
annotations:
# argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/hook: PreSync
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["dscinitialization.opendatahub.io"]
resources: ["dscinitializations"]
verbs: ["get", "list", "watch"]
- apiGroups: ["datasciencecluster.opendatahub.io"]
resources: ["datascienceclusters"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: presync-monitoring-cluster-role-binding
annotations:
argocd.argoproj.io/hook: PreSync
# argocd.argoproj.io/sync-wave: "0"
subjects:
- kind: ServiceAccount
name: presync-monitoring-sa
namespace: redhat-ods-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: presync-monitoring-cluster-role