Added labels and annotations to Helm Chart
Added configuration option for a user to specify annotations and labels for Jenkins CR and pod.
This commit is contained in:
parent
6f65d1c892
commit
7a7564f76b
|
|
@ -7,6 +7,9 @@ metadata:
|
||||||
{{- with .Values.jenkins.labels }}
|
{{- with .Values.jenkins.labels }}
|
||||||
labels: {{ toYaml . | nindent 4 }}
|
labels: {{ toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.jenkins.annotations }}
|
||||||
|
annotations: {{ toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
configurationAsCode:
|
configurationAsCode:
|
||||||
configurations:
|
configurations:
|
||||||
|
|
@ -68,6 +71,9 @@ spec:
|
||||||
{{- with .Values.jenkins.labels }}
|
{{- with .Values.jenkins.labels }}
|
||||||
labels: {{ toYaml . | nindent 6 }}
|
labels: {{ toYaml . | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.jenkins.annotations }}
|
||||||
|
annotations: {{ toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.jenkins.basePlugins }}
|
{{- with .Values.jenkins.basePlugins }}
|
||||||
basePlugins: {{ toYaml . | nindent 4 }}
|
basePlugins: {{ toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
@ -133,4 +139,4 @@ spec:
|
||||||
{{- with .Values.jenkins.seedJobs }}
|
{{- with .Values.jenkins.seedJobs }}
|
||||||
seedJobs: {{- toYaml . | nindent 4 }}
|
seedJobs: {{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ jenkins:
|
||||||
# labels are injected into metadata labels field
|
# labels are injected into metadata labels field
|
||||||
labels: {}
|
labels: {}
|
||||||
|
|
||||||
|
# annotations are injected into metadata annotations field
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
# image is the name (and tag) of the Jenkins instance
|
# image is the name (and tag) of the Jenkins instance
|
||||||
# Default: jenkins/jenkins:lts
|
# Default: jenkins/jenkins:lts
|
||||||
# It's recommended to use LTS (tag: "lts") version
|
# It's recommended to use LTS (tag: "lts") version
|
||||||
|
|
|
||||||
|
|
@ -56,5 +56,11 @@ To install, you need only to type these commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart
|
$ helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart
|
||||||
$ helm install jenkins/jenkins-operator
|
$ helm install <name> 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 <name> jenkins/jenkins-operator --set jenkins.labels.LabelKey=LabelValue,jenkins.annotations.AnnotationKey=AnnotationValue
|
||||||
```
|
```
|
||||||
Loading…
Reference in New Issue