kubernetes/monitoring/jenkins/jenkins-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: jenkins
namespace: monitoring
labels:
app: jenkins
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: jenkins
namespace: monitoring
labels:
app: jenkins
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
rules:
- apiGroups:
- ""
- "batch"
resources:
- nodes
- nodes/metrics
- nodes/proxy
- services
- endpoints
- pods
- replicationcontrollers
- daemonsets
- deployments
- replicasets
- statefulsets
- horizontalpodautoscalers
- jobs
- cronjobs
- pods/log
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: jenkins
labels:
app: jenkins
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: jenkins
subjects:
- kind: ServiceAccount
name: jenkins
namespace: monitoring