mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat: add httproute for K8s Gateway API (#23501)
<!-- If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting. --> No AI was used to generate this PR. Adds support for [Gateway API HTTPRoutes](https://gateway-api.sigs.k8s.io/api-types/httproute/) as an alternative to Ingress. --------- Signed-off-by: Carlo Field <carlo@swiss.dev> Co-authored-by: bpmct <bpmct@users.noreply.github.com> Co-authored-by: Ben Potter <ben@coder.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.coder.httproute.enable }}
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: coder
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "coder.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- toYaml .Values.coder.httproute.annotations | nindent 4 }}
|
||||
spec:
|
||||
parentRefs:
|
||||
{{- with .Values.coder.httproute.parentRefs }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: coder
|
||||
# gateway api does not support named ports
|
||||
port: 80
|
||||
hostnames:
|
||||
- {{ .Values.coder.httproute.host | quote }}
|
||||
{{- with .Values.coder.httproute.wildcardHost }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -429,6 +429,31 @@ coder:
|
||||
# use for the wildcard host.
|
||||
wildcardSecretName: ""
|
||||
|
||||
# coder.httproute -- The HTTPRoute object to expose for Coder.
|
||||
httproute:
|
||||
# coder.httproute.enable -- Whether to create the HTTPRoute object. If using a
|
||||
# Gateway, we recommend not specifying coder.tls.secretNames as the Gateway
|
||||
# will handle TLS termination.
|
||||
enable: false
|
||||
# coder.httproute.parentRefs -- the parentRefs to bind the route to
|
||||
# - name: my-gw
|
||||
# namespace: gateway-namespace
|
||||
# # sectionName is optional to fix to a specific listener
|
||||
# sectionName: listener-name
|
||||
parentRefs: []
|
||||
# coder.httproute.host -- The hostname to match on.
|
||||
# Be sure to also set CODER_ACCESS_URL within coder.env[]
|
||||
host: ""
|
||||
# coder.httproute.wildcardHost -- The wildcard hostname to match on. Should be
|
||||
# in the form "*.example.com" or "*-suffix.example.com". If you are using a
|
||||
# suffix after the wildcard, the suffix will be stripped from the created
|
||||
# ingress to ensure that it is a legal ingress host. Optional if not using
|
||||
# applications over subdomains.
|
||||
# Be sure to also set CODER_WILDCARD_ACCESS_URL within coder.env[]
|
||||
wildcardHost: ""
|
||||
# coder.httproute.annotations -- The HTTPRoute annotations.
|
||||
annotations: {}
|
||||
|
||||
# coder.command -- The command to use when running the Coder container. Used
|
||||
# for customizing the location of the `coder` binary in your image.
|
||||
command:
|
||||
|
||||
Reference in New Issue
Block a user