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

[prometheus-modbus-exporter] fix deployment template #4436

Merged
merged 3 commits into from Apr 23, 2024

Conversation

christopherime
Copy link
Contributor

@christopherime christopherime commented Apr 9, 2024

What this PR does / why we need it:

Hi, I have discover that the current deployment template for the prometheus-modbus-exporter does not handle the overloading of the registry that can be found in the values.

In the values.yaml there is two references for that action:

image:
  registry: docker.io
...
configReloaderSidecar:
  enabled: true
  image:
    registry: docker.io

But the actions in the deployment template are:

     containers:
       - name: {{ include "prometheus-modbus-exporter.fullname" . }}
         image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
       ...
        - name: {{ include "prometheus-modbus-exporter.fullname" . }}-config-reloader-sidecar
          image: "{{ .Values.configReloaderSidecar.image.repository }}:{{ .Values.configReloaderSidecar.image.tag }}"

The proposed change includes the .values.image.registry in the image address.

     containers:
       - name: {{ include "prometheus-modbus-exporter.fullname" . }}
         image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
       ...
       - name: {{ include "prometheus-modbus-exporter.fullname" . }}-config-reloader-sidecar
         image: "{{ .Values.configReloaderSidecar.image.repository }}:{{ .Values.configReloaderSidecar.image.tag }}"

This PR is to fix that and allow the user to use a different registry for the main image and the sidecar.
The chart has also been bumped from 0.1.0 to 0.1.1 to reflect the changes.

Which issue this PR fixes:

  • fixes # "N/A"

Checklist:

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

…istry value

Signed-off-by: Christophe Rime <christopherime@me.com>
@christopherime christopherime changed the title prometheus-modus-exporter: fix deployment template prometheus-modbus-exporter: fix deployment template Apr 9, 2024
@christopherime christopherime changed the title prometheus-modbus-exporter: fix deployment template [prometheus-modbus-exporter]: fix deployment template Apr 10, 2024
Copy link
Member

@zeritti zeritti left a comment

Choose a reason for hiding this comment

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

Thank you, @christopherime, for your PR, LGTM.

@zeritti zeritti changed the title [prometheus-modbus-exporter]: fix deployment template [prometheus-modbus-exporter] fix deployment template Apr 23, 2024
@zeritti zeritti merged commit 7f75d69 into prometheus-community:main Apr 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants