rbac.yaml (752B)
1 apiVersion: v1 2 kind: ServiceAccount 3 metadata: 4 name: k6-cronjob 5 namespace: k6-operator 6 --- 7 # Role in the matrix namespace so CronJob pods can manage TestRun objects there 8 apiVersion: rbac.authorization.k8s.io/v1 9 kind: Role 10 metadata: 11 name: k6-testrun-manager 12 namespace: matrix 13 rules: 14 - apiGroups: ["k6.io"] 15 resources: ["testruns"] 16 verbs: ["create", "get", "list", "watch", "delete"] 17 --- 18 # Bind the k6-operator SA to the matrix-namespace role 19 apiVersion: rbac.authorization.k8s.io/v1 20 kind: RoleBinding 21 metadata: 22 name: k6-cronjob-testrun-manager 23 namespace: matrix 24 subjects: 25 - kind: ServiceAccount 26 name: k6-cronjob 27 namespace: k6-operator 28 roleRef: 29 kind: Role 30 name: k6-testrun-manager 31 apiGroup: rbac.authorization.k8s.io