Skip to content

Commit

Permalink
[prometheus-artifactory-exporter] Allow setting additional labels on …
Browse files Browse the repository at this point in the history
…deployment and pods (#23)

* Allow setting additional labels on deployment and pods

- Adds `extraDeploymentLabels` that will add additional labels to the
  deployment
- Adds `extraPodLabels` that will add additional labels on the pod

* Update chart version

* Fix linter error
  • Loading branch information
tomgeorge authored Nov 27, 2024
1 parent 7469e70 commit f632524
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-artifactory-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.14.0"
description: A Helm chart for the Prometheus Artifactory Exporter
name: prometheus-artifactory-exporter
version: 0.6.3
version: 0.6.4
keywords:
- metrics
- artifactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metadata:
chart: {{ template "prometheus-artifactory-exporter.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.extraDeploymentLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -18,6 +21,9 @@ spec:
labels:
app: {{ template "prometheus-artifactory-exporter.name" . }}
release: {{ .Release.Name }}
{{- with .Values.extraPodLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/prometheus-artifactory-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ initContainers: []
# Extra containers for the exporter pod
extraContainers: []

# Extra labels for the exporter deployment
extraDeploymentLabels: {}

# Extra labels for the exporter pod
extraPodLabels: {}

# Extra Volumes for the pod
extraVolumes: []
# - name: example
Expand Down

0 comments on commit f632524

Please sign in to comment.