Skip to content

Commit

Permalink
fail if no vmauth urls defined
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Oct 2, 2024
1 parent b5c736d commit 6bb6387
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ spec: {{ toYaml (omit $spec "unauthorizedAccessConfig") | nindent 2 }}
{{- $urls = append $urls (include "vm.url" $ctx)}}
{{- end }}
{{- end }}
{{- if empty $urls }}
{{- fail (printf "No read backend urls defined for vmauth in AZ %s" $zone.name) -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 4 }}
{{- $_ := unset $ctx "style" }}
{{- $_ := unset $ctx "prefix" }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := unset $ctx "style" }}
{{- if empty $urls }}
{{- fail "No global vmauth read backend urls defined" -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 4 }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ spec:
{{- $urls = append $urls (include "vm.url" $ctx) }}
{{- end }}
{{- $_ := unset $ctx "style" }}
{{- if empty $urls }}
{{- fail "No global vmauth write backend urls defined" -}}
{{- end }}
url_prefix: {{ toYaml $urls | nindent 4 }}
{{- end }}

0 comments on commit 6bb6387

Please sign in to comment.