Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config-bootstrapper and test-runner RBAC #3672

Merged
merged 5 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion prow/cluster/control-plane/301-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ roleRef:
name: "test-pods-default"
subjects:
- kind: ServiceAccount
name: "default"
name: default
namespace: test-pods
- kind: ServiceAccount
name: test-runner
namespace: test-pods
- kind: ServiceAccount
name: nightly
namespace: test-pods
- kind: ServiceAccount
name: release
namespace: test-pods
---
kind: Role
Expand Down
45 changes: 45 additions & 0 deletions prow/cluster/control-plane/config-bootstrapper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: config-bootstrapper
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- patch
- update
- list
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: config-bootstrapper
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: config-bootstrapper
subjects:
- kind: ServiceAccount
name: config-bootstrapper
namespace: default
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: config-bootstrapper
namespace: default
---
# This is temporary and needs to be removed when prow plugins support gke-k8s-auth-plugins
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: config-bootstrapper-token
namespace: default
annotations:
kubernetes.io/service-account.name: config-bootstrapper
18 changes: 18 additions & 0 deletions prow/cluster/trusted/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,21 @@ spec:
provider:
gcpsm:
projectID: knative-tests
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: prow-kubeconfig
namespace: test-pods
spec:
refreshInterval: 30m
secretStoreRef:
kind: ClusterSecretStore
name: knative-tests
target:
name: prow-kubeconfig
creationPolicy: Owner
data:
- secretKey: kubeconfig.yaml
remoteRef:
key: config-bootstrap-kubeconfig