diff --git a/charts/prometheus-json-exporter/Chart.yaml b/charts/prometheus-json-exporter/Chart.yaml index 7d2bd1ac318e..47c3f0f22a44 100644 --- a/charts/prometheus-json-exporter/Chart.yaml +++ b/charts/prometheus-json-exporter/Chart.yaml @@ -19,7 +19,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.11.1 +version: 0.12.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/prometheus-json-exporter/templates/deployment.yaml b/charts/prometheus-json-exporter/templates/deployment.yaml index 0d38c654b01c..e35c719c68d1 100644 --- a/charts/prometheus-json-exporter/templates/deployment.yaml +++ b/charts/prometheus-json-exporter/templates/deployment.yaml @@ -38,10 +38,17 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- with .Values.extraInitContainers }} initContainers: - {{ toYaml . | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} + {{- with .Values.extraArgs }} + args: + {{- range . }} + - {{ .name | quote }} + - {{ .value | quote }} + {{- end }} + {{- end }} {{- with .Values.environmentVariables }} env: {{- toYaml . | nindent 12}} diff --git a/charts/prometheus-json-exporter/templates/servicemonitor.yaml b/charts/prometheus-json-exporter/templates/servicemonitor.yaml index 2239f2450fb0..c2ba166a6b03 100644 --- a/charts/prometheus-json-exporter/templates/servicemonitor.yaml +++ b/charts/prometheus-json-exporter/templates/servicemonitor.yaml @@ -41,6 +41,10 @@ spec: replacement: {{ $replacement }} action: replace {{- end }} + {{- with .additionalRelabels | default $.Values.serviceMonitor.defaults.additionalRelabels }} + relabelings: + {{- toYaml . | nindent 6 }} + {{- end }} jobLabel: "{{ $.Release.Name }}" selector: matchLabels: diff --git a/charts/prometheus-json-exporter/values.yaml b/charts/prometheus-json-exporter/values.yaml index 56750e71fddd..abb8c8738b01 100644 --- a/charts/prometheus-json-exporter/values.yaml +++ b/charts/prometheus-json-exporter/values.yaml @@ -62,6 +62,7 @@ serviceMonitor: # Default values that will be used for all ServiceMonitors created by `targets` defaults: additionalMetricsRelabels: {} + additionalRelabels: [] interval: 10s labels: {} scrapeTimeout: 30s @@ -73,6 +74,7 @@ serviceMonitor: # interval: 60s # Scraping interval. Overrides value set in `defaults` # scrapeTimeout: 60s # Scrape timeout. Overrides value set in `defaults` # additionalMetricsRelabels: {} # Map of metric labels and values to add +# additionalRelabels: [] # relabelings of metrics # module: example_module # Name of the module to pick up from `config.yaml` for scraping this target. Optional. Default is `default` provided by the exporter itself. ingress: @@ -203,3 +205,8 @@ extraInitContainers: [] # - name: init-myservice # image: busybox:1.28 # command: [ 'sh', '-c', "sleep 10; done" ] + +## Additional container arguments +extraArgs: [] +# - name: --config.file +# value: /app/config/myconfig.yml