-
Notifications
You must be signed in to change notification settings - Fork 831
Add support for K8S Gateway API (httpRoute config)
#3661
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
Merged
+208
−2
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
aaafca8
feat: enable HTTPRoute for Gateway API
Kyrremann b98badb
fix: better loop over hostnames
Kyrremann be0cdda
feat: Values schema documentation
Kyrremann 8fd37ed
fix: type needs to allow null
Kyrremann d838b81
fix: used host instead of hostname in schema
Kyrremann 14f6bce
fix: added default values for gateway
Kyrremann c2cb81a
feat: proper naming of resources
Kyrremann 47ee556
gateway: no longer beta, remove gke, fix casing
manics 565da63
Test gateway
manics c251b09
Move gateway check into separate test to avoid conflicts with autohttps
manics 92d624d
Test ingress
manics ea74528
Add annotations to HTTPRoute
manics 6220819
Add httpRoute linting test values
consideRatio 1db212d
Fix edge case with numerical namespace strings
consideRatio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| apiVersion: helm.cattle.io/v1 | ||
| kind: HelmChartConfig | ||
| metadata: | ||
| name: traefik | ||
| namespace: kube-system | ||
| spec: | ||
| valuesContent: |- | ||
| providers: | ||
| kubernetesGateway: | ||
| enabled: true | ||
| gateway: | ||
| listeners: | ||
| web: | ||
| # -- Routes are restricted to namespace of the gateway [by default](https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.FromNamespaces | ||
| namespacePolicy: All | ||
| logs: | ||
| access: | ||
| enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| {{- if .Values.httpRoute.enabled -}} | ||
| kind: HTTPRoute | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| metadata: | ||
| name: {{ include "jupyterhub.httpRoute.fullname" . }} | ||
| labels: | ||
| {{- include "jupyterhub.labels" . | nindent 4 }} | ||
| spec: | ||
| parentRefs: | ||
| - kind: Gateway | ||
| name: {{ .Values.httpRoute.gateway.name }} | ||
| {{- with .Values.httpRoute.gateway.namespace }} | ||
| namespace: {{ . }} | ||
| {{- end }} | ||
| {{- with .Values.httpRoute.hostnames }} | ||
| hostnames: | ||
| {{- . | toYaml | nindent 4 }} | ||
| {{- end }} | ||
| rules: | ||
| - backendRefs: | ||
| - name: proxy-public | ||
| port: 80 | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
In theory it should be possible to have autohttps working, but that would only be used for internal connections between the traefik ingress/gateway controller and the autohttps/proxy pod which effectively means it's no use, since the certificate is designed for external connections.
The certificate for external connections has to be managed by the gateway or ingress controller, not autohttps.
https://gateway-api.sigs.k8s.io/guides/tls/
I don't think autohttps is useful unless using a TCP LoadBalancer which passes network traffic straight through.
Uh oh!
There was an error while loading. Please reload this page.
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.
Rereading https://gateway-api.sigs.k8s.io/guides/tls/#tls-configuration there's a
Passthroughmode, but this is Experimental and I don't see what benefit it offers for autohttps- it adds unnecessary complexity.