Skip to content

Commit a879d73

Browse files
authored
Merge pull request #564 from procinger/renovate/major-monitoring-helm-charts
chore(deps): update helm release kube-prometheus-stack to v75
2 parents b896f1d + 6fe6870 commit a879d73

File tree

2 files changed

+49
-3
lines changed

2 files changed

+49
-3
lines changed

kubernetes-services/templates/prometheus.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
sources:
1414
- chart: kube-prometheus-stack
1515
repoURL: https://prometheus-community.github.io/helm-charts
16-
targetRevision: 71.1.0
16+
targetRevision: 75.6.1
1717
helm:
1818
values: |
1919
prometheusOperator:
@@ -71,6 +71,18 @@ spec:
7171
storageClassName: longhorn
7272
accessModes: ["ReadWriteOnce"]
7373
size: 1Gi
74+
initChownData:
75+
securityContext:
76+
runAsNonRoot: false
77+
runAsUser: 0
78+
seccompProfile:
79+
type: RuntimeDefault
80+
capabilities:
81+
add:
82+
- CHOWN
83+
- DAC_READ_SEARCH
84+
drop:
85+
- ALL
7486
- path: ./kubernetes-services/additions/prometheus
7587
repoURL: https://github.com/procinger/turing-pi-v2-cluster.git
7688
targetRevision: main

test/prometheus_test.go

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,43 @@ func TestPrometheus(t *testing.T) {
5151
)
5252

5353
promCurrent.Spec.Sources[i].Helm.Values = source.Helm.Values
54-
if promUpdate.Spec.Sources != nil {
55-
promUpdate.Spec.Sources[i].Helm.Values = source.Helm.Values
54+
}
55+
56+
for i, source := range promUpdate.Spec.Sources {
57+
if source.Chart == "" {
58+
continue
5659
}
60+
// replace storageClass; we do not have longhorn in ci
61+
source.Helm.Values = strings.Replace(
62+
source.Helm.Values,
63+
"longhorn",
64+
"standard",
65+
-1,
66+
)
67+
68+
// also shrink volume
69+
source.Helm.Values = strings.Replace(
70+
source.Helm.Values,
71+
"storage: 20Gi",
72+
"storage: 500Mi",
73+
-1,
74+
)
75+
76+
source.Helm.Values = strings.Replace(
77+
source.Helm.Values,
78+
"storage: 5Gi",
79+
"storage: 500Mi",
80+
-1,
81+
)
82+
83+
source.Helm.Values = strings.Replace(
84+
source.Helm.Values,
85+
"size: 1Gi",
86+
"size: 100Mi",
87+
-1,
88+
)
89+
90+
promUpdate.Spec.Sources[i].Helm.Values = source.Helm.Values
5791
}
5892

5993
client, err := test.GetClient()

0 commit comments

Comments
 (0)