-
Notifications
You must be signed in to change notification settings - Fork 164
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
Make canary-only configuration for skipper-ingress possible #7117
Conversation
@RomanZavodskikh that looks super complex. Why not something like a custom bool config item? |
0a30063
to
a0ce77f
Compare
Yes, I tried this idea, and I agree the configuration becomes much simpler. However, what if "skipper_ingress_canary_enabled" is set to "exclusive" in some important production cluster? Such accidential configuration will make all traffic go through single skipper-ingress pod. |
@RomanZavodskikh you can also damage it by setting max replica to 1... |
071cb19
to
0a30063
Compare
Okay, I see, we cannot take so much responsibility here. Reverted to the most simple option. |
5ec2ad2
to
0a30063
Compare
Looks much better now! |
I think you can add |
I also do not like that we change boolean (note _enabled suffix) config into multivalue but alternative is another config item which might be even worse. |
1c37c1e
to
21009ca
Compare
Signed-off-by: Roman Zavodskikh <[email protected]>
21009ca
to
69606de
Compare
👍 |
1 similar comment
👍 |
@@ -39,6 +39,8 @@ metadata: | |||
spec: | |||
{{ if index . "replicas" }} | |||
replicas: {{ .replicas }} | |||
{{ else if eq .Cluster.ConfigItems.skipper_ingress_test_single_pod "true" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I think it would be cleaner to do
{{ if eq .Cluster.ConfigItems.skipper_ingress_test_single_pod "true" }}
{{ template "skipper-ingress" dict
"name" "skipper-ingress"
"internal_version" $internal_version
"replicas": 0
"Cluster" .Cluster
"Values" .Values
}}
{{ else }}
{{ template "skipper-ingress" dict
"name" "skipper-ingress"
"internal_version" $internal_version
"Cluster" .Cluster
"Values" .Values
}}
{{ end }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also skipper_ingress_test_single_pod implies test and single, but it is single canary pod which in the future might become several pods.
Maybe it should be just skipper_ingress_replicas
that is empty by default:
{{ if ne .Cluster.ConfigItems.skipper_ingress_replicas "" }}
{{ template "skipper-ingress" dict
"name" "skipper-ingress"
"internal_version" $internal_version
"replicas": .Cluster.ConfigItems.skipper_ingress_replicas
"Cluster" .Cluster
"Values" .Values
}}
{{ else }}
{{ template "skipper-ingress" dict
"name" "skipper-ingress"
"internal_version" $internal_version
"Cluster" .Cluster
"Values" .Values
}}
{{ end }}
When "skipper_ingress_canary_enabled" and "skipper_ingress_test_single_pod" are both "true"