diff --git a/apps/jenkins/rbac.yaml b/apps/jenkins/rbac.yaml new file mode 100644 index 0000000..4b40500 --- /dev/null +++ b/apps/jenkins/rbac.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: jenkins + namespace: jenkins +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: jenkins-deployer +rules: +- apiGroups: [""] + resources: ["pods", "services", "configmaps", "secrets"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +- apiGroups: ["apps"] + resources: ["deployments", "statefulsets", "daemonsets", "replicasets"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +- apiGroups: ["networking.k8s.io"] + resources: ["ingresses"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +- apiGroups: ["argoproj.io"] + resources: ["applications"] + verbs: ["get", "list", "watch", "update", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: jenkins-deployer +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: jenkins-deployer +subjects: +- kind: ServiceAccount + name: jenkins + namespace: jenkins