Skip to content

Instantly share code, notes, and snippets.

@hitman99
Created July 17, 2019 17:54
Show Gist options
  • Save hitman99/37875c9549de55ef66a75e4f2c869377 to your computer and use it in GitHub Desktop.
Save hitman99/37875c9549de55ef66a75e4f2c869377 to your computer and use it in GitHub Desktop.
kubernetes rbac roel and binding for CI integration
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ci-cd
rules:
- apiGroups:
- apps
- extensions
resources:
- deployments
verbs:
- get
- list
- update
- watch
- patch
- apiGroups:
- apps
- extensions
resources:
- deployments/status
verbs:
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ci-cd
namespace: cloudtraining
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ci-cd
subjects:
- kind: ServiceAccount
name: ci
namespace: <replace>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment