Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added labels and annotations to Helm Chart #458

Merged
merged 2 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chart/jenkins-operator/templates/jenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion website/content/en/docs/Installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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
Comment on lines +59 to +65

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helm install <name> jenkins/jenkins-operator --set jenkins.labels.LabelKey=LabelValue,jenkins.annotations.AnnotationKey=AnnotationValue -> helm install <name> jenkins/jenkins-operator.

Add separated section with info about values.yaml customization possibility.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm already changing docs later (recommiting to fix_docs pull request) I guess I can add it then to not generate docs twice? We could do separate page about customizing with helm and leave a link there or add a 'helm section' in existing customization page.

```