From 0f507409ccf3d5b01d9cdb8cb576c51648972baf Mon Sep 17 00:00:00 2001 From: thecooldrop Date: Thu, 23 Dec 2021 13:37:08 +0100 Subject: [PATCH] Fixes #687 (#688) This is necessary in order to be able to provide the annotations attached to the service account associated with the Jenkins master instance. Co-authored-by: Vanio Begic --- chart/jenkins-operator/templates/jenkins.yaml | 3 +++ chart/jenkins-operator/values.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/chart/jenkins-operator/templates/jenkins.yaml b/chart/jenkins-operator/templates/jenkins.yaml index 5d40aec6..1d580066 100644 --- a/chart/jenkins-operator/templates/jenkins.yaml +++ b/chart/jenkins-operator/templates/jenkins.yaml @@ -85,6 +85,9 @@ spec: {{- with .Values.jenkins.notifications }} notifications: {{ toYaml . | nindent 4 }} {{- end }} + {{- with .Values.jenkins.serviceAccount }} + serviceAccount: {{ toYaml . | nindent 4 }} + {{- end }} master: {{- with .Values.jenkins.labels }} labels: {{ toYaml . | nindent 6 }} diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index 3ccd6a09..91dcfc97 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -59,6 +59,11 @@ jenkins: # See https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/notifications/ for more info notifications: [] + # Enables customization of the Service Account attached to the master Jenkins instance via annotations + # https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/#github.com/jenkinsci/kubernetes-operator/api/v1alpha2.ServiceAccount + serviceAccount: + annotations: {} + # basePlugins are plugins installed and required by the operator # Shouldn't contain plugins defined by user # You can change their versions here