From e791ad12434f7b2dc358b6bce8812eaae65e0a24 Mon Sep 17 00:00:00 2001 From: Dale Tristram Date: Thu, 10 Jan 2019 14:24:34 +0200 Subject: [PATCH] [stable/jenkins] Add role kind option (#8498) * [stable/jenkins] Add role kind option Signed-off-by: Dale Tristram * [stable/jenkins] Update chart version Signed-off-by: Dale Tristram --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/README.md | 3 ++- stable/jenkins/templates/rbac.yaml | 2 +- stable/jenkins/values.yaml | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 496b16bcca..00d59b9629 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.28.4 +version: 0.28.5 appVersion: lts description: Open source continuous integration server. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based diff --git a/stable/jenkins/README.md b/stable/jenkins/README.md index 8f7c8ba6ac..dc48a0f7f1 100644 --- a/stable/jenkins/README.md +++ b/stable/jenkins/README.md @@ -87,7 +87,8 @@ The following tables list the configurable parameters of the Jenkins chart and t | `NetworkPolicy.ApiVersion` | NetworkPolicy ApiVersion | `networking.k8s.io/v1` | | `rbac.install` | Create service account and ClusterRoleBinding for Kubernetes plugin | `false` | | `rbac.roleRef` | Cluster role name to bind to | `cluster-admin` | -| `rbac.roleBindingKind` | Role kind (`RoleBinding` or `ClusterRoleBinding`)| `ClusterRoleBinding` | +| `rbac.roleKind` | Role kind (`Role` or `ClusterRole`)| `ClusterRole` +| `rbac.roleBindingKind` | Role binding kind (`RoleBinding` or `ClusterRoleBinding`)| `ClusterRoleBinding` | ### Jenkins Agent diff --git a/stable/jenkins/templates/rbac.yaml b/stable/jenkins/templates/rbac.yaml index 0b89790792..f7f0127f2f 100644 --- a/stable/jenkins/templates/rbac.yaml +++ b/stable/jenkins/templates/rbac.yaml @@ -17,7 +17,7 @@ metadata: heritage: "{{ .Release.Service }}" roleRef: apiGroup: rbac.authorization.k8s.io - kind: ClusterRole + kind: {{ .Values.rbac.roleKind }} name: {{ .Values.rbac.roleRef }} subjects: - kind: ServiceAccount diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index 718a005362..5ec9ee3462 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -222,7 +222,9 @@ rbac: serviceAccountName: default # Role reference roleRef: cluster-admin - # Role kind (RoleBinding or ClusterRoleBinding) + # Role kind (Role or ClusterRole) + roleKind: ClusterRole + # Role binding kind (RoleBinding or ClusterRoleBinding) roleBindingKind: ClusterRoleBinding ## Backup cronjob configuration