Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Gateway Helm chart so that when twingate.resource.enabled is set, the rendered config.yaml automatically includes a Kubernetes upstreams entry for the in-cluster API server (and optionally derives its display name from the resource annotations).
Changes:
- Auto-populate an in-cluster Kubernetes upstream when
twingate.resource.enabledis true. - Allow overriding the auto-created upstream name via
twingate.resource.extraAnnotations["resource.twingate.com/name"]. - Add Helm unit tests covering the new resource-driven Kubernetes upstream behavior and ordering.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| deploy/gateway/templates/gateway-configmap.yaml | Builds the Kubernetes upstream list by prepending the resource-driven in-cluster upstream and then appending any user-specified upstreams (when Kubernetes is enabled). |
| deploy/gateway/templates/_helpers.tpl | Adds helper to compute the in-cluster upstream name, optionally sourced from resource annotations. |
| deploy/gateway/tests/gateway-configmap_test.yaml | Adds test coverage for resource-enabled scenarios: auto upstream creation, name override, ordering with manual upstreams, and behavior when kubernetes.enabled is false. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #232 +/- ##
==========================================
- Coverage 82.72% 82.61% -0.12%
==========================================
Files 35 35
Lines 2628 2628
==========================================
- Hits 2174 2171 -3
- Misses 341 345 +4
+ Partials 113 112 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Changes
Populate the k8s in-cluster upstream when
twingate.resourceis enabled in Helm values file