-
-
Notifications
You must be signed in to change notification settings - Fork 311
feat: add gateway handling to sefaria helm chart #3078
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
Changes from all commits
269993a
f7173fa
625ac78
db25cd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| {{- if .Values.gateway.enabled }} | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: ClientTrafficPolicy | ||
| metadata: | ||
| name: {{ .Values.deployEnv }} | ||
| labels: | ||
| {{- include "sefaria.labels" . | nindent 4 }} | ||
| spec: | ||
| targetRef: | ||
| group: gateway.networking.k8s.io | ||
| kind: Gateway | ||
| name: {{ .Values.deployEnv }} | ||
| alpn: | ||
| protocols: | ||
| - h2 | ||
| - http/1.1 | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||||||||||||||||
| {{- if .Values.gateway.enabled }} | ||||||||||||||||||||||
| apiVersion: gateway.networking.k8s.io/v1 | ||||||||||||||||||||||
| kind: Gateway | ||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||
| name: {{ .Values.deployEnv }} | ||||||||||||||||||||||
| labels: | ||||||||||||||||||||||
| {{- include "sefaria.labels" . | nindent 4 }} | ||||||||||||||||||||||
| annotations: {{ .Values.gateway.annotations | toYaml | nindent 4 }} | ||||||||||||||||||||||
|
||||||||||||||||||||||
| annotations: {{ .Values.gateway.annotations | toYaml | nindent 4 }} | |
| {{- with .Values.gateway.annotations }} | |
| annotations: | |
| {{- toYaml . | nindent 4 }} | |
| {{- end }} |
Copilot
AI
Feb 10, 2026
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.
The {{- $subdomain := printf "%s.%s" ... }} assignment is placed between YAML fields and uses {{- whitespace trimming, which can remove the newline after port: 443 and produce invalid YAML (e.g., port: 443hostname: ...). Compute the FQDN in a template block before emitting the list item fields, or remove left-trimming here so the newline is preserved (and consider using a different variable name like $fqdnSubdomain to avoid shadowing).
| - name: https-{{ $subdomain }}-{{ $code }} | |
| protocol: HTTPS | |
| port: 443 | |
| {{- $subdomain := printf "%s.%s" $subdomain $rootDomain }} | |
| hostname: {{ $subdomain }} | |
| {{- $fqdnSubdomain := printf "%s.%s" $subdomain $rootDomain }} | |
| - name: https-{{ $subdomain }}-{{ $code }} | |
| protocol: HTTPS | |
| port: 443 | |
| hostname: {{ $fqdnSubdomain }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| {{- if .Values.gateway.enabled }} | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
BrendanGalloway marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| name: {{ .Values.deployEnv }} | ||
| labels: | ||
| {{- include "sefaria.labels" . | nindent 4 }} | ||
| spec: | ||
| parentRefs: | ||
| - name: {{ .Values.deployEnv }} | ||
| hostnames: | ||
| {{- range .Values.domains.root }} | ||
| {{- $code := .code }} | ||
| {{- if kindIs "slice" $code }} | ||
| {{- $code = index $code 0 }} | ||
| {{- end }} | ||
| {{- $rootDomain := tpl .url $ | quote | trimAll "\"" }} | ||
| {{- $wwwDomain := printf "www.%s" $rootDomain }} | ||
| - {{ $rootDomain }} | ||
| - {{ $wwwDomain }} | ||
| {{- range $.Values.domains.modules }} | ||
| {{- $subdomain := index .subdomains $code }} | ||
| {{- if $subdomain }} | ||
| {{- $subdomain := printf "%s.%s" $subdomain $rootDomain }} | ||
| - {{ $subdomain }} | ||
BrendanGalloway marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
| rules: | ||
| - backendRefs: | ||
| - name: nginx-{{ $.Values.deployEnv }} | ||
| port: 80 | ||
| matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: / | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| {{- if .Values.ingress.enabled }} | ||
|
||
| apiVersion: networking.k8s.io/v1 | ||
| kind: Ingress | ||
| metadata: | ||
|
|
@@ -21,7 +22,7 @@ spec: | |
| {{- end }} | ||
| {{- $rootDomain := tpl .url $ | quote | trimAll "\"" }} | ||
| {{- $wwwDomain := printf "www.%s" $rootDomain }} | ||
| - secretName: {{ tpl .cert $ | default ( printf "origin-%s-$s-tls" $.Values.deployEnv $code ) }} | ||
| - secretName: {{ tpl .cert $ | default ( printf "origin-%s-%s-tls" $.Values.deployEnv $code ) }} | ||
| hosts: | ||
| - {{ $rootDomain }} | ||
| - {{ $wwwDomain }} | ||
|
|
@@ -75,3 +76,4 @@ spec: | |
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
Uh oh!
There was an error while loading. Please reload this page.