Skip to content

Commit 9b5ce3a

Browse files
elastisys-staffanviktor-f
authored andcommitted
Staging 0.49.1 (#2873)
Co-authored-by: Viktor Forsberg <viktor.forsberg@elastisys.com>
1 parent 35f24cb commit 9b5ce3a

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

changelog/0.49.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,13 @@ Released 2025-09-18
101101
- [#2746](https://github.com/elastisys/compliantkubernetes-apps/pull/2746) - fix: Split network policies tests between Calico & Cilium [@rarescosma](https://github.com/rarescosma)
102102
- [#2763](https://github.com/elastisys/compliantkubernetes-apps/pull/2763) - bug: apps: remove doubled "spec" field [@rarescosma](https://github.com/rarescosma)
103103
- [#2764](https://github.com/elastisys/compliantkubernetes-apps/pull/2764) - fix: Cilium test fixes [@rarescosma](https://github.com/rarescosma)
104+
105+
## v0.49.1
106+
107+
Released 2025-11-20
108+
109+
## Changes by kind
110+
111+
### Other(s)
112+
113+
- [#2858](https://github.com/elastisys/compliantkubernetes-apps/pull/2858) - bug: apps wc: move user alertmanager secret to created with install hook [@viktor-f](https://github.com/viktor-f)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
ROOT="$(readlink -f "$(dirname "${0}")/../../../")"
6+
7+
source "${ROOT}/scripts/migration/lib.sh"
8+
9+
run() {
10+
case "${1:-}" in
11+
execute)
12+
chart_version=$(yq '.version' "${ROOT}/helmfile.d/upstream/prometheus-community/kube-prometheus-stack/Chart.yaml")
13+
clusters=("${CK8S_CLUSTER}")
14+
if [[ "${CK8S_CLUSTER}" == "both" ]]; then
15+
clusters=("wc" "sc")
16+
fi
17+
18+
for cluster in "${clusters[@]}"; do
19+
20+
if [[ "${cluster}" == "wc" ]]; then
21+
kubectl_do "${cluster}" annotate secret -n alertmanager alertmanager-kube-prometheus-stack-alertmanager helm.sh/resource-policy=keep
22+
fi
23+
24+
current_version=$(helm_do "${cluster}" get metadata -n monitoring kube-prometheus-stack -ojson | jq -r '.version')
25+
26+
log_info "Upgrading kube-prometheus-stack on ${cluster}: ${current_version} -> ${chart_version}"
27+
28+
log_info " - Checking if kube-prometheus-stack CRDs need to be upgraded on ${cluster}"
29+
if [[ "${current_version}" != "${chart_version}" ]]; then
30+
log_info " - Replace kube-prometheus-stack CRDs on ${cluster}"
31+
kubectl_do "${cluster}" apply --server-side --force-conflicts -f "${ROOT}/helmfile.d/upstream/prometheus-community/kube-prometheus-stack/charts/crds/crds"
32+
else
33+
log_info " - CRDs up-to-date on ${cluster}, skipping"
34+
fi
35+
36+
log_info " - Upgrade kube-prometheus-stack on ${cluster}"
37+
helmfile_upgrade "${cluster}" app=prometheus
38+
done
39+
;;
40+
rollback)
41+
log_warn "rollback not implemented"
42+
;;
43+
*)
44+
log_fatal "usage: \"${0}\" <execute|rollback>"
45+
;;
46+
esac
47+
}
48+
49+
run "${@}"

0 commit comments

Comments
 (0)