Skip to content

Commit bd5ce9b

Browse files
authored
[kube-state-metrics] use named port for service and probes (#6098)
Signed-off-by: drfaust92 <[email protected]>
1 parent 7c9d0aa commit bd5ce9b

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

charts/kube-state-metrics/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords:
77
- prometheus
88
- kubernetes
99
type: application
10-
version: 6.2.0
10+
version: 6.3.0
1111
# renovate: github-releases=kubernetes/kube-state-metrics
1212
appVersion: 2.17.0
1313
home: https://github.com/kubernetes/kube-state-metrics/

charts/kube-state-metrics/templates/deployment.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ spec:
162162
{{- if eq .Values.kubeRBACProxy.enabled false }}
163163
ports:
164164
- containerPort: {{ .Values.service.port | default 8080}}
165-
name: "http"
165+
name: http
166166
{{- if .Values.selfMonitor.enabled }}
167167
- containerPort: {{ $telemetryPort }}
168-
name: "metrics"
168+
name: metrics
169169
{{- end }}
170170
{{- end }}
171171
{{- if .Values.startupProbe.enabled }}
@@ -182,7 +182,7 @@ spec:
182182
{{- end }}
183183
path: /healthz
184184
{{- if .Values.kubeRBACProxy.enabled }}
185-
port: {{ .Values.service.port | default 8080 }}
185+
port: http
186186
scheme: HTTPS
187187
{{- else }}
188188
port: {{ $servicePort }}
@@ -206,7 +206,7 @@ spec:
206206
{{- end }}
207207
path: /livez
208208
{{- if .Values.kubeRBACProxy.enabled }}
209-
port: {{ .Values.service.port | default 8080 }}
209+
port: http
210210
scheme: HTTPS
211211
{{- else }}
212212
port: {{ $servicePort }}
@@ -229,7 +229,7 @@ spec:
229229
{{- end }}
230230
path: /readyz
231231
{{- if .Values.kubeRBACProxy.enabled }}
232-
port: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
232+
port: metrics
233233
scheme: HTTPS
234234
{{- else }}
235235
port: {{ $telemetryPort }}
@@ -268,13 +268,13 @@ spec:
268268
image: {{ include "kubeRBACProxy.image" . }}
269269
ports:
270270
- containerPort: {{ .Values.service.port | default 8080}}
271-
name: "http"
271+
name: http
272272
- containerPort: {{ .Values.kubeRBACProxy.proxyEndpointsPort | default 8888 }}
273-
name: "http-healthz"
273+
name: http-healthz
274274
readinessProbe:
275275
httpGet:
276276
scheme: HTTPS
277-
port: {{ .Values.kubeRBACProxy.proxyEndpointsPort | default 8888 }}
277+
port: http-healthz
278278
path: /healthz
279279
initialDelaySeconds: 5
280280
timeoutSeconds: 5
@@ -309,9 +309,9 @@ spec:
309309
image: {{ include "kubeRBACProxy.image" . }}
310310
ports:
311311
- containerPort: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
312-
name: "metrics"
312+
name: metrics
313313
- containerPort: 8889
314-
name: "metrics-healthz"
314+
name: metrics-healthz
315315
readinessProbe:
316316
httpGet:
317317
scheme: HTTPS

charts/kube-state-metrics/templates/networkpolicy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
{{- else }}
2323
## Allow ingress on default ports by default
2424
- ports:
25-
- port: {{ .Values.service.port | default 8080 }}
25+
- port: http
2626
protocol: TCP
2727
{{- if .Values.selfMonitor.enabled }}
2828
{{- $telemetryPort := ternary 9091 (.Values.selfMonitor.telemetryPort | default 8081) .Values.kubeRBACProxy.enabled}}

charts/kube-state-metrics/templates/service.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ spec:
1919
ipFamilyPolicy: {{ .Values.service.ipDualStack.ipFamilyPolicy }}
2020
{{- end }}
2121
ports:
22-
- name: "http"
22+
- name: http
2323
protocol: TCP
2424
port: {{ .Values.service.port | default 8080}}
2525
{{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
2626
nodePort: {{ .Values.service.nodePort }}
2727
{{- end }}
28-
targetPort: {{ .Values.service.port | default 8080}}
28+
targetPort: http
2929
{{ if .Values.selfMonitor.enabled }}
30-
- name: "metrics"
30+
- name: metrics
3131
protocol: TCP
3232
port: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
33-
targetPort: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
33+
targetPort: metrics
3434
{{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
3535
nodePort: {{ .Values.selfMonitor.telemetryNodePort }}
3636
{{- end }}

0 commit comments

Comments
 (0)