-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[promtail] Avoid unnecessary pod restart on each helm chart version #2833
Conversation
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
0ba6c08
to
630a5f8
Compare
@zanhsieh I fixed the version conflict. |
Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
9d4b9bd
to
0041267
Compare
@zalegrala Can you review this PR please? |
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? |
If a major version of the helm chart does not modify config or podSpec, whats the reason for the restart? |
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. |
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 [@​jkroepke](https://github.com/jkroepke) in [https://github.com/grafana/helm-charts/pull/2833](https://github.com/grafana/helm-charts/pull/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 [@​venkatamutyala](https://github.com/venkatamutyala) in [https://github.com/grafana/helm-charts/pull/2843](https://github.com/grafana/helm-charts/pull/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-->
* 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
[![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 [@​jkroepke](https://github.com/jkroepke) in [https://github.com/grafana/helm-charts/pull/2833](https://github.com/grafana/helm-charts/pull/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 [@​venkatamutyala](https://github.com/venkatamutyala) in [https://github.com/grafana/helm-charts/pull/2843](https://github.com/grafana/helm-charts/pull/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>
[![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 [@​jkroepke](https://github.com/jkroepke) in [https://github.com/grafana/helm-charts/pull/2833](https://github.com/grafana/helm-charts/pull/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 [@​venkatamutyala](https://github.com/venkatamutyala) in [https://github.com/grafana/helm-charts/pull/2843](https://github.com/grafana/helm-charts/pull/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 [@​emilkor1](https://github.com/emilkor1) in [https://github.com/grafana/helm-charts/pull/2715](https://github.com/grafana/helm-charts/pull/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-->
[![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 [@​jkroepke](https://github.com/jkroepke) in [https://github.com/grafana/helm-charts/pull/2833](https://github.com/grafana/helm-charts/pull/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 [@​venkatamutyala](https://github.com/venkatamutyala) in [https://github.com/grafana/helm-charts/pull/2843](https://github.com/grafana/helm-charts/pull/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>
[![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 [@​jkroepke](https://github.com/jkroepke) in [https://github.com/grafana/helm-charts/pull/2833](https://github.com/grafana/helm-charts/pull/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 [@​venkatamutyala](https://github.com/venkatamutyala) in [https://github.com/grafana/helm-charts/pull/2843](https://github.com/grafana/helm-charts/pull/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>
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.