Skip to content

Conversation

@BrendanGalloway
Copy link
Contributor

Description

A brief description of the PR

Code Changes

The following changes were made to the files below

Notes

Any additional notes go here

@mergify
Copy link

mergify bot commented Feb 5, 2026

🧪 CI Insights

Here's what we observed from your CI run for db25cd6.

🟢 All jobs passed!

But CI Insights is watching 👀

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds optional Kubernetes Gateway API resources to the sefaria Helm chart while making the existing Ingress resource configurable via a new ingress.enabled flag.

Changes:

  • Add ingress.enabled and a new gateway values block (enable flag, class name, annotations).
  • Wrap the existing Ingress template in a conditional so it can be disabled.
  • Introduce Gateway API templates (Gateway, HTTPRoute) plus an Envoy Gateway ClientTrafficPolicy when gateway.enabled is true.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
helm-chart/sefaria/values.yaml Adds configuration flags for enabling/disabling Ingress and enabling/configuring Gateway resources.
helm-chart/sefaria/templates/ingress.yaml Gates Ingress rendering behind .Values.ingress.enabled.
helm-chart/sefaria/templates/gateway/gateway.yaml Adds a Gateway API Gateway with HTTP/HTTPS listeners and TLS secret references.
helm-chart/sefaria/templates/gateway/httproute.yaml Adds a Gateway API HTTPRoute routing hostnames to the nginx service.
helm-chart/sefaria/templates/gateway/clienttrafficpolicy.yaml Adds Envoy Gateway ClientTrafficPolicy (ALPN protocols) targeting the Gateway.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +46 to +50
- name: https-{{ $subdomain }}-{{ $code }}
protocol: HTTPS
port: 443
{{- $subdomain := printf "%s.%s" $subdomain $rootDomain }}
hostname: {{ $subdomain }}
Copy link

Copilot AI Feb 10, 2026

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).

Suggested change
- 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 }}

Copilot uses AI. Check for mistakes.
name: {{ .Values.deployEnv }}
labels:
{{- include "sefaria.labels" . | nindent 4 }}
annotations: {{ .Values.gateway.annotations | toYaml | nindent 4 }}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

metadata.annotations is rendered via toYaml without guarding for nil/empty values. If a user enables the gateway without setting gateway.annotations (e.g., helm upgrade --reuse-values --set gateway.enabled=true), this can render annotations: null, which is invalid for Kubernetes annotations (must be a map). Wrap this in a with/if block or default to an empty dict so the field is omitted or always a map.

Suggested change
annotations: {{ .Values.gateway.annotations | toYaml | nindent 4 }}
{{- with .Values.gateway.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}

Copilot uses AI. Check for mistakes.
@@ -1,3 +1,4 @@
{{- if .Values.ingress.enabled }}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

Gating the entire Ingress on .Values.ingress.enabled will disable Ingress when the key is absent. On upgrades that use helm upgrade --reuse-values, the new default from values.yaml won’t be applied, so existing releases could unexpectedly lose the Ingress. Consider defaulting this to true in the condition (e.g., | default true) to preserve legacy behavior unless explicitly disabled.

Copilot uses AI. Check for mistakes.
@yodem yodem added this pull request to the merge queue Feb 10, 2026
Merged via the queue into master with commit 48bb563 Feb 10, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants