Skip to content

Commit 6a7b066

Browse files
authored
[kube-state-metrics] Allow configuration of DNS for deployments (#5528)
Signed-off-by: James Bach <[email protected]>
1 parent 6fbe42a commit 6a7b066

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Diff for: charts/kube-state-metrics/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords:
77
- prometheus
88
- kubernetes
99
type: application
10-
version: 5.31.1
10+
version: 5.31.2
1111
# renovate: github-releases=kubernetes/kube-state-metrics
1212
appVersion: 2.15.0
1313
home: https://github.com/kubernetes/kube-state-metrics/

Diff for: charts/kube-state-metrics/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ spec:
5252
initContainers:
5353
{{- toYaml . | nindent 6 }}
5454
{{- end }}
55+
{{- if .Values.dnsConfig }}
56+
dnsConfig: {{ toYaml .Values.dnsConfig | nindent 8 }}
57+
{{- end }}
58+
dnsPolicy: {{ .Values.dnsPolicy }}
5559
containers:
5660
{{- $servicePort := ternary 9090 (.Values.service.port | default 8080) .Values.kubeRBACProxy.enabled}}
5761
{{- $telemetryPort := ternary 9091 (.Values.selfMonitor.telemetryPort | default 8081) .Values.kubeRBACProxy.enabled}}

Diff for: charts/kube-state-metrics/values.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,14 @@ initContainers: []
519519
# - name: crd-sidecar
520520
# image: kiwigrid/k8s-sidecar:latest
521521

522+
## dnsPolicy allows to change the default DNS configuration for the pod
523+
## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
524+
dnsPolicy: ClusterFirst
525+
526+
## dnsConfig allows setting up specific DNS configuration for the pod
527+
## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
528+
dnsConfig: {}
529+
522530
## Settings for startup, liveness and readiness probes
523531
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
524532
##

0 commit comments

Comments
 (0)