File tree Expand file tree Collapse file tree 2 files changed +49
-3
lines changed
kubernetes-services/templates Expand file tree Collapse file tree 2 files changed +49
-3
lines changed Original file line number Diff line number Diff line change 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:
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
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments