Add missing roles to sinker initial config
A new instance, if created from scratch, won't start since these roles will be missing.
@@ -236,19 +236,45 @@ metadata:
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
+ namespace: default
name: "sinker"
rules:
- apiGroups:
- - ""
+ - "prow.k8s.io"
resources:
- - pods
+ - prowjobs
verbs:
- delete
- list
+ - watch
+ - get
- apiGroups:
- - "prow.k8s.io"
+ - ""
resources:
- - prowjobs
+ - configmaps
+ resourceNames:
+ - prow-sinker-leaderlock
+ verbs:
+ - get
+ - update
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - events
+ verbs:
+ - create
+---
+kind: Role
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ namespace: test-pods
+ name: "sinker"
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - pods
verbs:
- delete
- list
@@ -256,6 +282,20 @@ rules:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
+ namespace: default
+ name: "sinker"
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: "sinker"
+subjects:
+- kind: ServiceAccount
+ name: "sinker"
+---
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ namespace: test-pods
name: "sinker"
roleRef:
apiGroup: rbac.authorization.k8s.io
