From b22774e2f2019c0e5d8182aab6111a84e95fa8ca Mon Sep 17 00:00:00 2001 From: hamza3202 Date: Thu, 11 Apr 2019 14:02:12 +0500 Subject: [PATCH] [stable/jenkins] Add support for service account annotations in jenkins (#12969) * Fix configmap of keycloak Signed-off-by: kahootali * Add support for serviceAccountAnnotations Signed-off-by: Muhammad Hamza Zaib --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/README.md | 2 ++ stable/jenkins/templates/service-account.yaml | 4 ++++ stable/jenkins/values.yaml | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 4183ef4b73..f8bda33709 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.37.2 +version: 0.37.3 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 c5a859a3cd..97ce52da82 100644 --- a/stable/jenkins/README.md +++ b/stable/jenkins/README.md @@ -105,6 +105,8 @@ The following tables list the configurable parameters of the Jenkins chart and t | `NetworkPolicy.Enabled` | Enable creation of NetworkPolicy resources. | `false` | | `NetworkPolicy.ApiVersion` | NetworkPolicy ApiVersion | `networking.k8s.io/v1` | | `rbac.install` | Create service account and ClusterRoleBinding for Kubernetes plugin | `false` | +| `rbac.serviceAccountName` | Name of service account | `default` | +| `rbac.serviceAccountAnnotations` | Service Account annotations | `{}` | | `rbac.roleRef` | Cluster role name to bind to | `cluster-admin` | | `rbac.roleKind` | Role kind (`Role` or `ClusterRole`)| `ClusterRole` | `rbac.roleBindingKind` | Role binding kind (`RoleBinding` or `ClusterRoleBinding`)| `ClusterRoleBinding` | diff --git a/stable/jenkins/templates/service-account.yaml b/stable/jenkins/templates/service-account.yaml index 244e70655f..fe5ee82e1c 100644 --- a/stable/jenkins/templates/service-account.yaml +++ b/stable/jenkins/templates/service-account.yaml @@ -4,6 +4,10 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ $serviceName }} +{{- if .Values.rbac.serviceAccountAnnotations }} + annotations: +{{ toYaml .Values.rbac.serviceAccountAnnotations | indent 4 }} +{{ end }} labels: app: {{ $serviceName }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index 5f274115e6..bcc92a0025 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -361,6 +361,7 @@ NetworkPolicy: rbac: install: false serviceAccountName: default + serviceAccountAnnotations: {} # Role reference roleRef: cluster-admin # Role kind (Role or ClusterRole)