kitchen: Allow Jenkins to restart deployment
Jenkins is now allowed to restart the Deployment named *kitchen* in the *kitchen* namespace. It will do this after pushing a new container image from a build of the *master* branch.dch-webhooks-secrets
parent
de054bd68f
commit
668b5bf5a9
|
@ -111,3 +111,35 @@ spec:
|
||||||
name: kitchen
|
name: kitchen
|
||||||
port:
|
port:
|
||||||
name: http
|
name: http
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: jenkins
|
||||||
|
namespace: kitchen
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
resourceNames:
|
||||||
|
- kitchen
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: jenkins
|
||||||
|
namespace: kitchen
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: jenkins
|
||||||
|
subjects:
|
||||||
|
- apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: User
|
||||||
|
name: jenkins
|
||||||
|
|
Loading…
Reference in New Issue