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-node-exporter] Updated to add k8s service port config #4415

Conversation

arahja
Copy link
Contributor

@arahja arahja commented Apr 4, 2024

Updated prometheus-node-exporter helm chart to allow you to change the Kubernetes service port separately from the container port.

@gianrubio
@zanhsieh
@zeritti

What this PR does

This PR Makes a small change to the prometheus-node-exporter helm chart to allow you to change the Kubernetes service that the helm chart creates and allow you to set the port that the service presents. This change defaults to the current behavior of the chart. This PR adds a new variable that will allow you change the port that the service presents.

Why we need it

If I change service.port to 80 the pods fail to start because of the security context. I do not want to disable the security context. The current behavior is if I change the service.port it also changes the container port to match the service port. The desire is to be able to change only the port number that the service presents and leave the pod configuration at the defaults.

Which issue this PR fixes

Special notes for your reviewer

Checklist

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

…e Kubernetes service port seperately from the container port. fixes prometheus-community#4414

Signed-off-by: Adam Rahja <[email protected]>
@zeritti
Copy link
Member

zeritti commented Apr 25, 2024

Thank you, @arahja, for your PR.

Adding another port in the service would indeed work but would also be a workaround only (and thereby would service allow setting three ports out of which two must generally be equal).
The dependency of the main container port on the service port which in fact does not exist should not be maintained. Instead, we may prefer removing this dependency by providing a field to set the container port as such which can be taken either by the exporter itself or by RBAC Proxy if enabled.

Suppose we chose containerPort for that purpose. This field would then replace service.port in the pod template (for completeness we could also introduce containerPortName for its name). Such a change could be considered major, though.

zanhsieh
zanhsieh previously approved these changes Apr 28, 2024
@zanhsieh zanhsieh merged commit 42a5358 into prometheus-community:main Aug 7, 2024
4 checks passed
kireque referenced this pull request in kireque/home-ops Aug 8, 2024
…863)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[prometheus-node-exporter](https://togithub.com/prometheus/node_exporter/)
([source](https://togithub.com/prometheus-community/helm-charts)) |
patch | `4.37.1` -> `4.37.3` |

---

### Release Notes

<details>
<summary>prometheus-community/helm-charts
(prometheus-node-exporter)</summary>

###
[`v4.37.3`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.37.3)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.37.2...prometheus-node-exporter-4.37.3)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] Support hostIPC setting by
[@&#8203;dongjiang1989](https://togithub.com/dongjiang1989) in
[https://github.com/prometheus-community/helm-charts/pull/4772](https://togithub.com/prometheus-community/helm-charts/pull/4772)

**Full Changelog**:
prometheus-community/helm-charts@prometheus-redis-exporter-6.4.1...prometheus-node-exporter-4.37.3

###
[`v4.37.2`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.37.2)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.37.1...prometheus-node-exporter-4.37.2)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] Updated to add k8s service port config by
[@&#8203;arahja](https://togithub.com/arahja) in
[https://github.com/prometheus-community/helm-charts/pull/4415](https://togithub.com/prometheus-community/helm-charts/pull/4415)

#### New Contributors

- [@&#8203;arahja](https://togithub.com/arahja) made their first
contribution in
[https://github.com/prometheus-community/helm-charts/pull/4415](https://togithub.com/prometheus-community/helm-charts/pull/4415)

**Full Changelog**:
prometheus-community/helm-charts@prometheus-postgres-exporter-6.2.0...prometheus-node-exporter-4.37.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMS4wIiwidXBkYXRlZEluVmVyIjoiMzguMjEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUvaGVsbSIsInR5cGUvcGF0Y2giXX0=-->

Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
lambchop4prez referenced this pull request in lambchop4prez/network Aug 11, 2024
…159)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[prometheus-node-exporter](https://togithub.com/prometheus/node_exporter/)
([source](https://togithub.com/prometheus-community/helm-charts)) |
minor | `4.34.0` -> `4.37.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>prometheus-community/helm-charts
(prometheus-node-exporter)</summary>

###
[`v4.37.3`](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.37.2...prometheus-node-exporter-4.37.3)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.37.2...prometheus-node-exporter-4.37.3)

###
[`v4.37.2`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.37.2)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.37.1...prometheus-node-exporter-4.37.2)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] Updated to add k8s service port config by
[@&#8203;arahja](https://togithub.com/arahja) in
[https://github.com/prometheus-community/helm-charts/pull/4415](https://togithub.com/prometheus-community/helm-charts/pull/4415)

#### New Contributors

- [@&#8203;arahja](https://togithub.com/arahja) made their first
contribution in
[https://github.com/prometheus-community/helm-charts/pull/4415](https://togithub.com/prometheus-community/helm-charts/pull/4415)

**Full Changelog**:
prometheus-community/helm-charts@prometheus-postgres-exporter-6.2.0...prometheus-node-exporter-4.37.2

###
[`v4.37.1`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.37.1)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.37.0...prometheus-node-exporter-4.37.1)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] bump node exporter to 1.8.2 by
[@&#8203;DrFaust92](https://togithub.com/DrFaust92) in
[https://github.com/prometheus-community/helm-charts/pull/4721](https://togithub.com/prometheus-community/helm-charts/pull/4721)

**Full Changelog**:
prometheus-community/helm-charts@prometheus-25.24.1...prometheus-node-exporter-4.37.1

###
[`v4.37.0`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.37.0)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.36.0...prometheus-node-exporter-4.37.0)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] add automountServiceAccountToken for
serviceaccount resource by
[@&#8203;rgaduput](https://togithub.com/rgaduput) in
[https://github.com/prometheus-community/helm-charts/pull/4629](https://togithub.com/prometheus-community/helm-charts/pull/4629)

**Full Changelog**:
prometheus-community/helm-charts@kube-prometheus-stack-61.0.0...prometheus-node-exporter-4.37.0

###
[`v4.36.0`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.36.0)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.35.0...prometheus-node-exporter-4.36.0)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] permit to customize service clusterIP by
[@&#8203;nerzhul](https://togithub.com/nerzhul) in
[https://github.com/prometheus-community/helm-charts/pull/4597](https://togithub.com/prometheus-community/helm-charts/pull/4597)

#### New Contributors

- [@&#8203;nerzhul](https://togithub.com/nerzhul) made their first
contribution in
[https://github.com/prometheus-community/helm-charts/pull/4597](https://togithub.com/prometheus-community/helm-charts/pull/4597)

**Full Changelog**:
prometheus-community/helm-charts@prometheus-node-exporter-4.35.0...prometheus-node-exporter-4.36.0

###
[`v4.35.0`](https://togithub.com/prometheus-community/helm-charts/releases/tag/prometheus-node-exporter-4.35.0)

[Compare
Source](https://togithub.com/prometheus-community/helm-charts/compare/prometheus-node-exporter-4.34.0...prometheus-node-exporter-4.35.0)

A Helm chart for prometheus node-exporter

#### What's Changed

- \[prometheus-node-exporter] bump exporter to 1.8.1 + kube-rbac-proxy
to 0.18.0 by [@&#8203;DrFaust92](https://togithub.com/DrFaust92) in
[https://github.com/prometheus-community/helm-charts/pull/4594](https://togithub.com/prometheus-community/helm-charts/pull/4594)

**Full Changelog**:
prometheus-community/helm-charts@kube-prometheus-stack-60.0.2...prometheus-node-exporter-4.35.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/lambchop4prez/network).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM4LjIwLjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
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.

[prometheus-node-exporter] Unable to define Service port seperately from container port.
3 participants