diff --git a/chart/jenkins-operator/templates/jenkins.yaml b/chart/jenkins-operator/templates/jenkins.yaml index 783d3461..23abc497 100644 --- a/chart/jenkins-operator/templates/jenkins.yaml +++ b/chart/jenkins-operator/templates/jenkins.yaml @@ -68,6 +68,9 @@ spec: {{- with .Values.jenkins.labels }} labels: {{ toYaml . | nindent 6 }} {{- end }} + {{- with .Values.jenkins.annotations }} + annotations: {{ toYaml . | nindent 6 }} + {{- end }} {{- with .Values.jenkins.basePlugins }} basePlugins: {{ toYaml . | nindent 4 }} {{- end }} diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index f6a5ccea..ac300b91 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -23,6 +23,9 @@ jenkins: # labels are injected into metadata labels field labels: {} + # annotations are injected into metadata annotations field + annotations: {} + # image is the name (and tag) of the Jenkins instance # Default: jenkins/jenkins:lts # It's recommended to use LTS (tag: "lts") version diff --git a/website/content/en/docs/Installation/_index.md b/website/content/en/docs/Installation/_index.md index 7d470982..4786ad19 100644 --- a/website/content/en/docs/Installation/_index.md +++ b/website/content/en/docs/Installation/_index.md @@ -56,5 +56,11 @@ To install, you need only to type these commands: ```bash $ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart -$ helm install jenkins/jenkins-operator +$ helm install jenkins/jenkins-operator +``` + +To add custom labels and annotations, you can use `values.yaml` file or pass them into `helm install` command, e.g.: + +```bash +$ helm install jenkins/jenkins-operator --set jenkins.labels.LabelKey=LabelValue,jenkins.annotations.AnnotationKey=AnnotationValue ``` \ No newline at end of file