feat: add listenerset#24993
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
thanks for putting this together — nice that you validated end-to-end against kgateway in the description. a few things i'd want addressed before this merges: bugs
gaps
Comment posted by Coder Agents on behalf of @bpmct |
|
Hi @bpmct, thanks for the review.
fixed.
Added
fixed.
fixed.
I've never written Helm tests before. If they're needed, I'll take a closer look.
done.
I don't agree with that, since these two resources belong together. However, if you'd still like me to, I can put the redirect route in a separate file. |
|
Thanks! Giving this a shot on my machine now, then will likely flag for someone else on the dev team to review too! |
|
Hi @bpmct, any updates? |
rowansmithau
left a comment
There was a problem hiding this comment.
hey @0xmeyer thanks for the contribution. I've added some review notes if you could take a look at those please.
on the tests, if you take a look at https://github.com/coder/coder/blob/main/helm/coder/tests/testdata/host_aliases.yaml (and the others in that directory) you will get an idea of the required structure. those test files are used to generate the .golden files which are used across version/code changes for comparison.
| @@ -1,3 +1,11 @@ | |||
| {{- if and .Values.coder.httproute.enable (empty .Values.coder.httproute.parentRefs) -}} | |||
| {{- fail "coder.httproute.parentRefs is required when coder.httproute.enable=true" -}} | |||
There was a problem hiding this comment.
Is there a reason why parentRefs are now being enforced? this would be a potentially breaking change for existing users from the way it was previously implemented by @bpmct and according to https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1/shared_types.go#L179-L259, parentRefs are optional.
➜ coder git:(0xmeyer/main) ✗ helm template coder . --set coder.httproute.enable=true
Error: execution error at (coder/templates/httproute.yaml:2:4): coder.httproute.parentRefs is required when coder.httproute.enable=true
Use --debug flag to render out invalid YAML
➜ coder git:(0xmeyer/main) ✗ helm template coder coder-v2/coder --set coder.httproute.enable=true | head -n5
---
# Source: coder/templates/coder.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- with .Values.coder.listenerset.listeners }} | ||
| listeners: |
There was a problem hiding this comment.
this looks to be the inverse of httproute.parentRefs in that a populated listeners block is required per the spec with the +required notation. You can render a chart without it, i.e,
helm template coder . --set coder.image.tag=v2.34.0 --set coder.httproute.enable=true --set "coder.httproute.parentRefs[0].name=fake-gateway" --set "coder.httproute.parentRefs[0].namespace=fake-ns" --set coder.listenerset.enable=true --set "coder.listenerset.parentRef.name=fake-gateway" --set "coder.listenerset.parentRef.namespace=fake-ns"
but it may cause issues at apply/install time, so should have a safeguard like httproute does.
Adds support for Gateway API ListenerSet.
This PR was validated using
kgateway-v2.3.0-mainusing the following values:Validate: