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

[promtail] Avoid unnecessary pod restart on each helm chart version #2833

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

jkroepke
Copy link
Collaborator

This PR changes the the input of the config checksum which triggers the reload.

On main branch, the whole configmap/secret checksum is included as checksum input. The configmap contains labels which includes the helm chart version. Each new helm chart version forces a pod restart which is not always necessary.

For example: #2221 would not require a pod restart.

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
@jkroepke jkroepke force-pushed the promtail/checksum-optimiztation branch from 0ba6c08 to 630a5f8 Compare December 10, 2023 09:37
@jkroepke jkroepke changed the title promtail: Optimize config checksum [promtail] Optimize config checksum Dec 10, 2023
@jkroepke jkroepke changed the title [promtail] Optimize config checksum [promtail] Avoid unnecessary pod restart on each helm chart version Dec 10, 2023
@jkroepke
Copy link
Collaborator Author

@zanhsieh I fixed the version conflict.

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
@jkroepke jkroepke force-pushed the promtail/checksum-optimiztation branch from 9d4b9bd to 0041267 Compare January 29, 2024 11:46
@zanhsieh
Copy link
Collaborator

@zalegrala Can you review this PR please?

@zalegrala
Copy link
Contributor

I believe this will mean that you never restart your pods, even if there is a major version bump, correct? Are we sure this is desireable?

@jkroepke
Copy link
Collaborator Author

jkroepke commented Jan 29, 2024

If a major version of the helm chart does not modify config or podSpec, whats the reason for the restart?

@zalegrala
Copy link
Contributor

Would a major version bump of promtail be caught here?

@jkroepke
Copy link
Collaborator Author

Would a major version bump of promtail be caught here?

Sure, if the major version bump changes podSpec (which includes the image version) or config, it would restart the promtail as expected.

@zalegrala zalegrala merged commit 0793b49 into grafana:main Jan 29, 2024
6 checks passed
@jkroepke jkroepke deleted the promtail/checksum-optimiztation branch January 29, 2024 21:35
kodiakhq bot pushed a commit to cloudquery/helm-charts that referenced this pull request Feb 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [promtail](https://grafana.com/loki) ([source](https://github.com/grafana/helm-charts)) | patch | `6.15.3` -> `6.15.5` |

---

### Release Notes

<details>
<summary>grafana/helm-charts (promtail)</summary>

### [`v6.15.5`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.5)

[Compare Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.4...promtail-6.15.5)

Promtail is an agent which ships the contents of local logs to a Loki instance

#### What's Changed

-   \[promtail] Avoid unnecessary pod restart on each helm chart version by [@&#8203;jkroepke](https://github.com/jkroepke) in [grafana/helm-charts#2833

**Full Changelog**: grafana/helm-charts@grafana-7.2.5...promtail-6.15.5

### [`v6.15.4`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.4)

[Compare Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.3...promtail-6.15.4)

Promtail is an agent which ships the contents of local logs to a Loki instance

#### What's Changed

-   \[promtail] bump promtail version to 2.9.3 by [@&#8203;venkatamutyala](https://github.com/venkatamutyala) in [grafana/helm-charts#2843

**Full Changelog**: grafana/helm-charts@tempo-distributed-1.8.1...promtail-6.15.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), 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://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNjMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE2My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
amorey pushed a commit to kubetail-org/helm-charts that referenced this pull request Mar 1, 2024
* Avoid unnecessary restarts at new helm version: The ConfigMap where the config is stored, contains labels. The labels contains the version of the helm chart. If there is a new helm chart version, the pod gets restarted, too. It doesnt matter, if its necessary or not. To solve this, I moved the config to a named templated which can be sourced from the config map and the hash annotation. I contribute this pattern to many helm charts: ([promtail] Avoid unnecessary pod restart on each helm chart version grafana/helm-charts#2833, [bitnami/kubernetes-event-exporter] Avoid unnecessary pod restart on each helm chart version bitnami/charts#21489, [prometheus-blackbox-exporter] Avoid unnecessary pod restart on each helm chart version prometheus-community/helm-charts#4077, helm: Avoid unnecessary pod restart on each helm chart version kubernetes-sigs/external-dns#4103)
* Added securityContexts to container and pod. They contains the current best-practice. The settings are required to run kubelint together with PSA restricted.
* Added automountServiceAccountToken to the Deployment and ServiceAccount. A lot of security tools hightlight automountServiceAccountToken=true on a ServiceAccount as insecure. The best-practice is to set automountServiceAccountToken=false on a ServiceAccount and do automountServiceAccountToken=true on the Deployment. Ref: https://securecloud.blog/2021/08/17/azure-aks-reviewing-recommendations-from-security-center-disabling-automounting-api-credentials
* Added nodeSelector, affinity, tolerations, priorityClassName
Pass .Values.config, .Values.ingress.hosts.hosts through helm tpl function: If kubelint is part of a bigger umbrella helm chart, values from .Values.global can be re-used. It's also useful for the namespace option
* Adds configurable readinessProbe to deployment
* Bumps chart version number
mjnagel added a commit to defenseunicorns/uds-core that referenced this pull request Apr 1, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.io/grafana/promtail | patch | `2.9.2` -> `2.9.6` |
| docker.io/jimmidyson/configmap-reload | minor | `v0.8.0` -> `v0.9.0` |
| [promtail](https://grafana.com/loki)
([source](https://github.com/grafana/helm-charts)) | patch | `6.15.3`
-> `6.15.5` |
|
[registry1.dso.mil/ironbank/opensource/grafana/promtail](https://github.com/grafana/loki)
([source](https://repo1.dso.mil/dsop/opensource/grafana/promtail)) |
patch | `v2.9.2` -> `v2.9.5` |
|
[registry1.dso.mil/ironbank/opensource/jimmidyson/configmap-reload](https://github.com/jimmidyson/configmap-reload)
([source](https://repo1.dso.mil/dsop/opensource/jimmidyson/configmap-reload))
| minor | `v0.8.0` -> `v0.12.0` |

---

### Release Notes

<details>
<summary>grafana/helm-charts (promtail)</summary>

###
[`v6.15.5`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.5)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.4...promtail-6.15.5)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] Avoid unnecessary pod restart on each helm chart version
by [@&#8203;jkroepke](https://github.com/jkroepke) in
[grafana/helm-charts#2833

**Full Changelog**:
grafana/helm-charts@grafana-7.2.5...promtail-6.15.5

###
[`v6.15.4`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.4)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.3...promtail-6.15.4)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] bump promtail version to 2.9.3 by
[@&#8203;venkatamutyala](https://github.com/venkatamutyala) in
[grafana/helm-charts#2843

**Full Changelog**:
grafana/helm-charts@tempo-distributed-1.8.1...promtail-6.15.4

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/defenseunicorns/uds-core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: TristanHoladay <40547442+TristanHoladay@users.noreply.github.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
lambchop4prez added a commit to lambchop4prez/network that referenced this pull request Apr 7, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [promtail](https://grafana.com/loki)
([source](https://github.com/grafana/helm-charts)) | patch | `6.15.2`
-> `6.15.5` |

---

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

---

### Release Notes

<details>
<summary>grafana/helm-charts (promtail)</summary>

###
[`v6.15.5`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.5)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.4...promtail-6.15.5)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] Avoid unnecessary pod restart on each helm chart version
by [@&#8203;jkroepke](https://github.com/jkroepke) in
[grafana/helm-charts#2833

**Full Changelog**:
grafana/helm-charts@grafana-7.2.5...promtail-6.15.5

###
[`v6.15.4`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.4)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.3...promtail-6.15.4)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] bump promtail version to 2.9.3 by
[@&#8203;venkatamutyala](https://github.com/venkatamutyala) in
[grafana/helm-charts#2843

**Full Changelog**:
grafana/helm-charts@tempo-distributed-1.8.1...promtail-6.15.4

###
[`v6.15.3`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.3)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.2...promtail-6.15.3)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] bump promtail version to 2.9.2 by
[@&#8203;emilkor1](https://github.com/emilkor1) in
[grafana/helm-charts#2715

**Full Changelog**:
grafana/helm-charts@loki-distributed-0.76.0...promtail-6.15.3

</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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/lambchop4prez/network).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
robmcelvenny pushed a commit to owen-grady/uds-core-slim-dev that referenced this pull request Jun 3, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.io/grafana/promtail | patch | `2.9.2` -> `2.9.6` |
| docker.io/jimmidyson/configmap-reload | minor | `v0.8.0` -> `v0.9.0` |
| [promtail](https://grafana.com/loki)
([source](https://github.com/grafana/helm-charts)) | patch | `6.15.3`
-> `6.15.5` |
|
[registry1.dso.mil/ironbank/opensource/grafana/promtail](https://github.com/grafana/loki)
([source](https://repo1.dso.mil/dsop/opensource/grafana/promtail)) |
patch | `v2.9.2` -> `v2.9.5` |
|
[registry1.dso.mil/ironbank/opensource/jimmidyson/configmap-reload](https://github.com/jimmidyson/configmap-reload)
([source](https://repo1.dso.mil/dsop/opensource/jimmidyson/configmap-reload))
| minor | `v0.8.0` -> `v0.12.0` |

---

### Release Notes

<details>
<summary>grafana/helm-charts (promtail)</summary>

###
[`v6.15.5`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.5)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.4...promtail-6.15.5)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] Avoid unnecessary pod restart on each helm chart version
by [@&#8203;jkroepke](https://github.com/jkroepke) in
[grafana/helm-charts#2833

**Full Changelog**:
grafana/helm-charts@grafana-7.2.5...promtail-6.15.5

###
[`v6.15.4`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.4)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.3...promtail-6.15.4)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] bump promtail version to 2.9.3 by
[@&#8203;venkatamutyala](https://github.com/venkatamutyala) in
[grafana/helm-charts#2843

**Full Changelog**:
grafana/helm-charts@tempo-distributed-1.8.1...promtail-6.15.4

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/defenseunicorns/uds-core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: TristanHoladay <40547442+TristanHoladay@users.noreply.github.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
rjferguson21 pushed a commit to defenseunicorns/uds-core that referenced this pull request Jul 11, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.io/grafana/promtail | patch | `2.9.2` -> `2.9.6` |
| docker.io/jimmidyson/configmap-reload | minor | `v0.8.0` -> `v0.9.0` |
| [promtail](https://grafana.com/loki)
([source](https://github.com/grafana/helm-charts)) | patch | `6.15.3`
-> `6.15.5` |
|
[registry1.dso.mil/ironbank/opensource/grafana/promtail](https://github.com/grafana/loki)
([source](https://repo1.dso.mil/dsop/opensource/grafana/promtail)) |
patch | `v2.9.2` -> `v2.9.5` |
|
[registry1.dso.mil/ironbank/opensource/jimmidyson/configmap-reload](https://github.com/jimmidyson/configmap-reload)
([source](https://repo1.dso.mil/dsop/opensource/jimmidyson/configmap-reload))
| minor | `v0.8.0` -> `v0.12.0` |

---

### Release Notes

<details>
<summary>grafana/helm-charts (promtail)</summary>

###
[`v6.15.5`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.5)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.4...promtail-6.15.5)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] Avoid unnecessary pod restart on each helm chart version
by [@&#8203;jkroepke](https://github.com/jkroepke) in
[grafana/helm-charts#2833

**Full Changelog**:
grafana/helm-charts@grafana-7.2.5...promtail-6.15.5

###
[`v6.15.4`](https://github.com/grafana/helm-charts/releases/tag/promtail-6.15.4)

[Compare
Source](https://github.com/grafana/helm-charts/compare/promtail-6.15.3...promtail-6.15.4)

Promtail is an agent which ships the contents of local logs to a Loki
instance

#### What's Changed

- \[promtail] bump promtail version to 2.9.3 by
[@&#8203;venkatamutyala](https://github.com/venkatamutyala) in
[grafana/helm-charts#2843

**Full Changelog**:
grafana/helm-charts@tempo-distributed-1.8.1...promtail-6.15.4

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/defenseunicorns/uds-core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: TristanHoladay <40547442+TristanHoladay@users.noreply.github.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
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

3 participants