From 4ba75fb528d8206eed0fff0922b1dbe99d4b7bd0 Mon Sep 17 00:00:00 2001 From: Filip Haftek Date: Tue, 11 Feb 2025 14:17:46 +0100 Subject: [PATCH] fix: frontend PodDisruptionBudget (#633) ### Checklist - [x] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) - [x] Update [changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md) - [x] Update [Kubernetes update doc](https://docs.sourcegraph.com/admin/updates/kubernetes) ### Test plan Unit test. e2e on cluster. --- charts/sourcegraph/CHANGELOG.md | 2 ++ .../frontend/sourcegraph-frontend.PodDisruptionBudget.yaml | 5 +++-- charts/sourcegraph/tests/podDisruptionBudget_test.yaml | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/sourcegraph/CHANGELOG.md b/charts/sourcegraph/CHANGELOG.md index e1f7848c..2614bc39 100644 --- a/charts/sourcegraph/CHANGELOG.md +++ b/charts/sourcegraph/CHANGELOG.md @@ -8,6 +8,8 @@ Use `**BREAKING**:` to denote a breaking change ## Unreleased +- Fix Pod Disruption Budget for sourcegraph-frontend + ## 5.10.0 - Updated OpenTelemetry collector and agent images to run as non-root users [#543](https://github.com/sourcegraph/deploy-sourcegraph-helm/pull/543) diff --git a/charts/sourcegraph/templates/frontend/sourcegraph-frontend.PodDisruptionBudget.yaml b/charts/sourcegraph/templates/frontend/sourcegraph-frontend.PodDisruptionBudget.yaml index 35d4c0a4..db2b6930 100644 --- a/charts/sourcegraph/templates/frontend/sourcegraph-frontend.PodDisruptionBudget.yaml +++ b/charts/sourcegraph/templates/frontend/sourcegraph-frontend.PodDisruptionBudget.yaml @@ -6,6 +6,7 @@ metadata: spec: {{- toYaml .Values.frontend.podDisruptionBudget | nindent 2 }} selector: - {{- include "sourcegraph.selectorLabels" . | nindent 4 }} - app: sourcegraph-frontend + matchLabels: + {{- include "sourcegraph.selectorLabels" . | nindent 6 }} + app: sourcegraph-frontend {{- end }} diff --git a/charts/sourcegraph/tests/podDisruptionBudget_test.yaml b/charts/sourcegraph/tests/podDisruptionBudget_test.yaml index 3f8c3a32..f83ccf5c 100644 --- a/charts/sourcegraph/tests/podDisruptionBudget_test.yaml +++ b/charts/sourcegraph/tests/podDisruptionBudget_test.yaml @@ -13,3 +13,6 @@ tests: - equal: path: spec.minAvailable value: 1 + - equal: + path: spec.selector.matchLabels.app + value: sourcegraph-frontend