Skip to content

Commit

Permalink
[kube-prometheus-stack] fix reloader-web's app protocol (prometheus-c…
Browse files Browse the repository at this point in the history
…ommunity#3762)

* [kube-prometheus-stack] fix reloader-web's app protocol

Signed-off-by: Andre Baptista Aguas <[email protected]>

* guard appProtocol with target kubernetes version check

Signed-off-by: Andre Baptista Aguas <[email protected]>

* Move kubeTargetVersion to top of file

Signed-off-by: André Águas <[email protected]>

* Move kubeTargetVersion to top of file

Signed-off-by: André Águas <[email protected]>

---------

Signed-off-by: Andre Baptista Aguas <[email protected]>
Signed-off-by: André Águas <[email protected]>
  • Loading branch information
abaguas authored and Matiasmct committed Mar 20, 2024
1 parent 6a1cb33 commit 5b41cea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 51.0.1
version: 51.0.2
appVersion: v0.68.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if .Values.alertmanager.enabled }}
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -44,6 +45,9 @@ spec:
targetPort: {{ .Values.alertmanager.service.targetPort }}
protocol: TCP
- name: reloader-web
{{- if semverCompare ">=1.20.0-0" $kubeTargetVersion }}
appProtocol: http
{{- end }}
port: 8080
targetPort: reloader-web
{{- if .Values.alertmanager.service.additionalPorts }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if .Values.prometheus.enabled }}
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -43,6 +44,9 @@ spec:
port: {{ .Values.prometheus.service.port }}
targetPort: {{ .Values.prometheus.service.targetPort }}
- name: reloader-web
{{- if semverCompare "> 1.20.0-0" $kubeTargetVersion }}
appProtocol: http
{{- end }}
port: 8080
targetPort: reloader-web
{{- if .Values.prometheus.thanosIngress.enabled }}
Expand Down

0 comments on commit 5b41cea

Please sign in to comment.