-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add externalServers.skipServerWatch to helm for working with load balancers #1686
Conversation
- add CONSUL_SKIP_SERVER_WATCH env variable to _helpers.tpl - bats tests in connect-inject-deployment to validate that env variable works for skip server watch - add externalServers.skipServerWatch to values.yaml - read env variable in as a flag in flags/consul and unit tests.
check that server-watch-disabled is set with connect injector
f80ce55
to
94c5e1e
Compare
@@ -8,6 +8,7 @@ | |||
{{- $serverEnabled := (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) -}} | |||
{{- $serverExposeServiceEnabled := (or (and (ne (.Values.server.exposeService.enabled | toString) "-") .Values.server.exposeService.enabled) (and (eq (.Values.server.exposeService.enabled | toString) "-") .Values.global.adminPartitions.enabled)) -}} | |||
{{- if and .Values.externalServers.enabled (not .Values.externalServers.hosts) }}{{ fail "externalServers.hosts must be set if externalServers.enabled is true" }}{{ end -}} | |||
{{- if and .Values.externalServers.skipServerWatch (not .Values.externalServers.enabled) }}{{ fail "externalServers.enabled must be set if externalServers.skipServerWatch is true" }}{{ 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.
Putting the fail condition here so that it is obvious that it pairs with the checks in connect-inject-deployment.bats.
A similar thing is done for externalServers.hosts and _helpers.tpl. The checks are here in connect-inject-deployment.yaml.
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.
This is really nicely done and so concise!!
@@ -355,6 +355,10 @@ Consul server environment variables for consul-k8s commands. | |||
value: {{ .Values.externalServers.tlsServerName }} | |||
{{- end }} | |||
{{- end }} | |||
{{- if and .Values.externalServers.enabled .Values.externalServers.skipServerWatch }} | |||
- name: CONSUL_SKIP_SERVER_WATCH | |||
value: "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.
it's a nit but can we unqoute the "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.
Looks great!!
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
Changes proposed in this PR:
externalServers.skipServerWatch
externalServers.enabled
is also set whenexternalServers.skipServerWatch=true
in connect-inject-deployment.yaml-server-watch-disabled=true
flagHow I've tested this PR:
How I expect reviewers to test this PR:
👀
Checklist: