Update and add missing roles to deck initial config
A new instance, if created from scratch, won't show logs since these roles will be wrong or missing.
Shamelessly copied from k8s Prow config.
@@ -132,6 +132,20 @@ metadata:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
+ namespace: default
+ name: "deck"
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: "deck"
+subjects:
+- kind: ServiceAccount
+ name: "deck"
+---
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ namespace: test-pods
name: "deck"
roleRef:
apiGroup: rbac.authorization.k8s.io
@@ -145,21 +159,33 @@ subjects:
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
+ namespace: default
name: "deck"
rules:
- apiGroups:
- - ""
+ - "prow.k8s.io"
resources:
- - pods/log
+ - prowjobs
verbs:
- get
+ - list
+ # Required when deck runs with `--rerun-creates-job=true`
+ # **Warning:** Only use this for non-public deck instances, this allows
+ # anyone with access to your Deck instance to create new Prowjobs
+ # - create
+---
+kind: Role
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ namespace: test-pods
+ name: "deck"
+rules:
- apiGroups:
- - "prow.k8s.io"
+ - ""
resources:
- - prowjobs
+ - pods/log
verbs:
- get
- - list
---
kind: ServiceAccount
