Skip to content

Commit 240eb6f

Browse files
skipper: use internal CIDRs variable for healthcheck routes
* reuse existing `cluster_internal_cidrs` variable that accounts for `zalando-eks` provider configuration instead of ad-hoc formatting * remove `-whitelisted-healthcheck-cidr` flag added by #9218 which is not used since #9206 configured explicit healthcheck routes * indent and preserve newlines in healthcheck routes Follow up on #9206 Signed-off-by: Alexander Yastrebov <[email protected]>
1 parent 96f74d5 commit 240eb6f

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

cluster/manifests/skipper/deployment.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ spec:
177177
- "-kubernetes-default-lb-algorithm={{ .Cluster.ConfigItems.skipper_ingress_default_lb_algorithm }}"
178178
- "-kubernetes-disable-catchall-routes={{ .Cluster.ConfigItems.skipper_ingress_disable_catchall_routes }}"
179179
- "-enable-kubernetes-endpointslices={{ .Cluster.ConfigItems.skipper_endpointslices_enabled }}"
180-
{{ if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6")}}
181-
- "-whitelisted-healthcheck-cidr={{ .Values.subnet_ipv6_cidrs }}"
182-
{{ end }}
183180
{{ end }}
184181
- "-address=:9999"
185182
- "-wait-first-route-load"
@@ -323,21 +320,18 @@ spec:
323320
- "-forwarded-headers=X-Forwarded-For,X-Forwarded-Proto=https,X-Forwarded-Port=443"
324321
- '-forwarded-headers-exclude-cidrs={{ .cluster_internal_cidrs | join "," }}'
325322
{{ end }}
326-
- >-
327-
-inline-routes=
328-
kube__healthz_down:
329-
Path("/kube-system/healthz") &&
330-
Shutdown() &&
331-
SourceFromLast("10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12", "127.0.0.1/8", "::1/128"{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6")}}{{ range $ip := split .Values.subnet_ipv6_cidrs "," }},"{{ $ip }}"{{ end }}{{- else }}, "fd00::/8"{{- end }})
332-
-> disableAccessLog()
333-
-> status(503)
334-
-> <shunt>;
335-
kube__healthz_up:
336-
Path("/kube-system/healthz") &&
337-
SourceFromLast("10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12", "127.0.0.1/8", "::1/128"{{- if and (eq .Cluster.Provider "zalando-eks") (eq .Cluster.ConfigItems.eks_ip_family "ipv6")}}{{ range $ip := split .Values.subnet_ipv6_cidrs "," }},"{{ $ip }}"{{ end }}{{- else }}, "fd00::/8"{{- end }})
338-
-> disableAccessLog()
339-
-> status(200)
340-
-> <shunt>;
323+
- "-inline-routes"
324+
- |
325+
kube__healthz_down: Path("/kube-system/healthz") && Shutdown()
326+
&& SourceFromLast("{{ .cluster_internal_cidrs | join `","` }}", "10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12", "127.0.0.1/8", "fd00::/8", "::1/128")
327+
-> disableAccessLog()
328+
-> status(503)
329+
-> <shunt>;
330+
kube__healthz_up: Path("/kube-system/healthz")
331+
&& SourceFromLast("{{ .cluster_internal_cidrs | join `","` }}", "10.0.0.0/8", "192.168.0.0/16", "172.16.0.0/12", "127.0.0.1/8", "fd00::/8", "::1/128")
332+
-> disableAccessLog()
333+
-> status(200)
334+
-> <shunt>;
341335
{{ .Cluster.ConfigItems.skipper_ingress_inline_routes }}
342336
343337
{{ if .Cluster.ConfigItems.skipper_ingress_health_check_options }}

0 commit comments

Comments
 (0)