From a6549edd1a7e1ad6a5e9425e470f4a8d5ef47670 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Fri, 2 May 2025 15:21:36 +0300 Subject: [PATCH] kubeadm: use named ports for coredns probes This is done for consistency as the coredns deployment already had named ports. --- cmd/kubeadm/app/phases/addons/dns/dns_test.go | 20 +++++++++++++++---- .../app/phases/addons/dns/manifests.go | 10 ++++++++-- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/cmd/kubeadm/app/phases/addons/dns/dns_test.go b/cmd/kubeadm/app/phases/addons/dns/dns_test.go index 8954c341533..4d4186728bf 100644 --- a/cmd/kubeadm/app/phases/addons/dns/dns_test.go +++ b/cmd/kubeadm/app/phases/addons/dns/dns_test.go @@ -733,10 +733,16 @@ spec: - containerPort: 9153 name: metrics protocol: TCP + - containerPort: 8080 + name: liveness-probe + protocol: TCP + - containerPort: 8181 + name: readiness-probe + protocol: TCP livenessProbe: httpGet: path: /health - port: 8080 + port: liveness-probe scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -745,7 +751,7 @@ spec: readinessProbe: httpGet: path: /ready - port: 8181 + port: readiness-probe scheme: HTTP securityContext: allowPrivilegeEscalation: false @@ -1017,10 +1023,16 @@ spec: - containerPort: 9153 name: metrics protocol: TCP + - containerPort: 8080 + name: liveness-probe + protocol: TCP + - containerPort: 8181 + name: readiness-probe + protocol: TCP livenessProbe: httpGet: path: /health - port: 8080 + port: liveness-probe scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -1029,7 +1041,7 @@ spec: readinessProbe: httpGet: path: /ready - port: 8181 + port: readiness-probe scheme: HTTP securityContext: allowPrivilegeEscalation: false diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go index 1358733b5be..f44e597763d 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go @@ -121,10 +121,16 @@ spec: - containerPort: 9153 name: metrics protocol: TCP + - containerPort: 8080 + name: liveness-probe + protocol: TCP + - containerPort: 8181 + name: readiness-probe + protocol: TCP livenessProbe: httpGet: path: /health - port: 8080 + port: liveness-probe scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -133,7 +139,7 @@ spec: readinessProbe: httpGet: path: /ready - port: 8181 + port: readiness-probe scheme: HTTP securityContext: allowPrivilegeEscalation: false