Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ingress/routesrv: Makes skipper_routesrv_enabled a three state switch #4940

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cluster/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ skipper_redis_write_timeout: "25ms"

skipper_cluster_ratelimit_max_group_shards: 1

#
# skipper routesrv settings
#
# skipper_routesrv_enabled is a three state switch:
# - "false" - routesrv deployment is removed, skipper uses own k8s dataclient
# - "pre" - routesrv is deployed, skipper uses own k8s dataclient
# - "exec" - routesrv is deployed, skipper uses routesrv
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used exec instead of true similar to nlb_switch and to hint that its a three state config

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no that's not needed here. skipper-ingress waits for first successful route load and routesrv has the time to startup before it hurts skipper-ingress.

{{if eq .Cluster.Environment "production"}}
skipper_routesrv_enabled: "false"
skipper_routesrv_replicas: 3
Expand Down
2 changes: 1 addition & 1 deletion cluster/manifests/deletions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ post_apply:
kind: ClusterRoleBinding
{{- end }}

{{ if ne .Cluster.ConfigItems.skipper_routesrv_enabled "true" }}
{{ if eq .Cluster.ConfigItems.skipper_routesrv_enabled "false" }}
- name: skipper-ingress-routesrv
namespace: kube-system
kind: Deployment
Expand Down
12 changes: 6 additions & 6 deletions cluster/manifests/skipper/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ spec:
args:
- "run.sh"
- "skipper"
{{ if eq .ConfigItems.skipper_routesrv_enabled "true" }}
{{ if eq .ConfigItems.skipper_routesrv_enabled "exec" }}
- "-routes-urls=http://skipper-ingress-routesrv.kube-system.svc.cluster.local/routes"
- "-normalize-host"
{{ else }}
Expand All @@ -103,11 +103,11 @@ spec:
- "-address=:9999"
- "-wait-first-route-load"
- "-wait-for-healthcheck-interval={{ .Cluster.ConfigItems.skipper_wait_for_healthcheck_interval }}"
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "true") (eq .ConfigItems.enable_skipper_eastwest "true")}}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "exec") (eq .ConfigItems.enable_skipper_eastwest "true")}}
- "-enable-kubernetes-east-west"
- "-kubernetes-east-west-domain=.ingress.cluster.local"
{{ end }}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "true") (eq .ConfigItems.enable_skipper_eastwest_range "true")}}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "exec") (eq .ConfigItems.enable_skipper_eastwest_range "true")}}
- "-kubernetes-east-west-range-domains=ingress.cluster.local"
- "-kubernetes-east-west-range-predicates=ClientIP(\"10.2.0.0/16\", \"{{ .Values.vpc_ipv4_cidr }}\")"
{{ end }}
Expand Down Expand Up @@ -135,7 +135,7 @@ spec:
- "-api-usage-monitoring-client-keys=https://identity.zalando.com/managed-id,sub"
- "-api-usage-monitoring-default-client-tracking-pattern=services[.].*"
{{ end }}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "true") (eq .ConfigItems.enable_apimonitoring "true")}}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "exec") (eq .ConfigItems.enable_apimonitoring "true")}}
- "-default-filters-dir=/etc/config/default-filters"
{{ end }}
- "-max-audit-body=0"
Expand Down Expand Up @@ -275,7 +275,7 @@ spec:
- name: routes
mountPath: /etc/routes
{{ end }}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "true") (eq .ConfigItems.enable_apimonitoring "true")}}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "exec") (eq .ConfigItems.enable_apimonitoring "true")}}
- name: filters
mountPath: /etc/config/default-filters
{{ end }}
Expand All @@ -295,7 +295,7 @@ spec:
configMap:
name: sandbox-tokeninfo-bridge-conf
{{ end }}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "true") (eq .ConfigItems.enable_apimonitoring "true") }}
{{ if and (ne .ConfigItems.skipper_routesrv_enabled "exec") (eq .ConfigItems.enable_apimonitoring "true") }}
- name: filters
configMap:
name: skipper-default-filters
Expand Down
2 changes: 1 addition & 1 deletion cluster/manifests/skipper/routesrv-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if ne .ConfigItems.skipper_routesrv_enabled "true" }}
{{ if ne .ConfigItems.skipper_routesrv_enabled "false" }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a wrong condition introduced by #4937

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down