dch-webhooks: Add role for Jenkins to deploy
Jenkins needs to be able to patch the Deployment to trigger a restart after it builds a new container image for _dch-webhooks_. Note that this manifest must be applied on its own **without Kustomize**. Kustomize seems to think the `dch-webhooks` in `resourceNames` refers to the ConfigMap it manages and "helpfully" renames it with the name suffix hash. It's _not_ the ConfigMap, though, but there's not really any way to tell it this.pull/78/head
parent
3960552f99
commit
4977f513c5
|
@ -0,0 +1,28 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: jenkins.dch-webhooks
|
||||
rules:
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
resourceNames:
|
||||
- dch-webhooks
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: jenkins.dch-webhooks
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: jenkins.dch-webhooks
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: jenkins-jobs
|
Loading…
Reference in New Issue