From 86d943d8f43f3c7f6e7c210eb273708d10a6ee79 Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Fri, 23 Jun 2023 11:09:06 +0200 Subject: [PATCH] helm: add updateStategy for canary pods (#9760) **What this PR does / why we need it**: Allows configuring Canary DaemonSet rollout. **Which issue(s) this PR fixes**: N/A **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated - [ ] If the change is worth mentioning in the release notes, add `add-to-release-notes` label - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` - [x] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) --- docs/sources/installation/helm/reference.md | 14 ++++++++++++++ production/helm/loki/CHANGELOG.md | 3 +++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/loki-canary/daemonset.yaml | 4 ++++ production/helm/loki/values.yaml | 6 ++++++ 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/sources/installation/helm/reference.md b/docs/sources/installation/helm/reference.md index 6c50c40dbeec0..05f7b6a10de49 100644 --- a/docs/sources/installation/helm/reference.md +++ b/docs/sources/installation/helm/reference.md @@ -2455,6 +2455,20 @@ null
 []
 
+ + + + monitoring.lokiCanary.updateStrategy + object + Update strategy for the `loki-canary` Daemonset pods +
+{
+  "rollingUpdate": {
+    "maxUnavailable": 1
+  },
+  "type": "RollingUpdate"
+}
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 954661f242ee2..0ddc8730c2ea4 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -12,6 +12,9 @@ Entries should be ordered as follows: Entries should include a reference to the pull request that introduced the change. [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.8.4 + +- [ENHANCEMENT] Add loki.lokiCanary.updateStrategy configuration ## 5.8.3 diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 5006a51d0a3f6..4ca317af91cd1 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.8.2 -version: 5.8.3 +version: 5.8.4 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index ff04bd0f916dd..3cf0f1819edca 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.8.3](https://img.shields.io/badge/Version-5.8.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) +![Version: 5.8.4](https://img.shields.io/badge/Version-5.8.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/loki-canary/daemonset.yaml b/production/helm/loki/templates/loki-canary/daemonset.yaml index f2dc06f8bdb6f..c127ced279433 100644 --- a/production/helm/loki/templates/loki-canary/daemonset.yaml +++ b/production/helm/loki/templates/loki-canary/daemonset.yaml @@ -12,6 +12,10 @@ spec: selector: matchLabels: {{- include "loki-canary.selectorLabels" $ | nindent 6 }} + {{- with .updateStrategy }} + updateStrategy: + {{- toYaml . | nindent 4 }} + {{- end }} template: metadata: annotations: diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index a20351fe0f111..24679f158fbee 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -661,6 +661,12 @@ monitoring: digest: null # -- Docker image pull policy pullPolicy: IfNotPresent + # -- Update strategy for the `loki-canary` Daemonset pods + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + # Configuration for the write pod(s) write: # -- Number of replicas for the write