mirror of
https://github.com/coder/coder.git
synced 2025-07-10 23:53:15 +00:00
feat: add ingress to helm chart (#4446)
* feat: add ingress to helm chart * chore: multiple hostname support in ingress * fixup! chore: multiple hostname support in ingress Co-authored-by: Dean Sheather <dean@deansheather.com>
This commit is contained in:
53
helm/templates/ingress.yaml
Normal file
53
helm/templates/ingress.yaml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
{{- if .Values.coder.ingress.enable }}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: coder
|
||||||
|
labels:
|
||||||
|
{{- include "coder.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml .Values.coder.ingress.annotations | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.coder.ingress.className }}
|
||||||
|
{{/* If this is set to an empty string it fails validation on K8s */}}
|
||||||
|
ingressClassName: {{ .Values.coder.ingress.className | quote }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
rules:
|
||||||
|
- host: {{ .Values.coder.ingress.host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: coder
|
||||||
|
port:
|
||||||
|
name: {{ include "coder.portName" . | quote }}
|
||||||
|
{{- if .Values.coder.ingress.wildcardHost }}
|
||||||
|
- host: {{ .Values.coder.ingress.wildcardHost | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: coder
|
||||||
|
port:
|
||||||
|
name: {{ include "coder.portName" . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.coder.ingress.tls.enable }}
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.coder.ingress.host | quote }}
|
||||||
|
secretName: {{ .Values.coder.ingress.tls.secretName | quote}}
|
||||||
|
{{- if .Values.coder.ingress.tls.wildcardSecretName }}
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.coder.ingress.wildcardHost | quote }}
|
||||||
|
secretName: {{ .Values.coder.ingress.tls.wildcardSecretName | quote}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
@ -59,7 +59,8 @@ coder:
|
|||||||
|
|
||||||
# coder.resources -- The resources to request for Coder. These are optional
|
# coder.resources -- The resources to request for Coder. These are optional
|
||||||
# and are not set by default.
|
# and are not set by default.
|
||||||
resources: {}
|
resources:
|
||||||
|
{}
|
||||||
# limits:
|
# limits:
|
||||||
# cpu: 100m
|
# cpu: 100m
|
||||||
# memory: 128Mi
|
# memory: 128Mi
|
||||||
@ -88,3 +89,29 @@ coder:
|
|||||||
# coder.service.annotations -- The service annotations. See:
|
# coder.service.annotations -- The service annotations. See:
|
||||||
# https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
# https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
|
# coder.ingress -- The Ingress object to expose for Coder.
|
||||||
|
ingress:
|
||||||
|
# coder.ingress.enable -- Whether to create the Ingress object. If using an
|
||||||
|
# Ingress, we recommend not specifying coder.tls.secretNames as the Ingress
|
||||||
|
# will handle TLS termination.
|
||||||
|
enable: false
|
||||||
|
# coder.ingress.className -- The name of the Ingress class to use.
|
||||||
|
className: ""
|
||||||
|
# coder.ingress.host -- The hostname to match on.
|
||||||
|
host: ""
|
||||||
|
# coder.ingress.wildcardHost -- The wildcard hostname to match on. Should be
|
||||||
|
# in the form "*.example.com". Optional if not using applications over
|
||||||
|
# subdomains.
|
||||||
|
wildcardHost: ""
|
||||||
|
# coder.ingress.annotations -- The ingress annotations.
|
||||||
|
annotations: {}
|
||||||
|
# coder.ingress.tls -- The TLS configuration to use for the Ingress.
|
||||||
|
tls:
|
||||||
|
# coder.ingress.tls.enable -- Whether to enable TLS on the Ingress.
|
||||||
|
enable: false
|
||||||
|
# coder.ingress.tls.secretName -- The name of the TLS secret to use.
|
||||||
|
secretName: ""
|
||||||
|
# coder.ingress.tls.wildcardSecretName -- The name of the TLS secret to
|
||||||
|
# use for the wildcard host.
|
||||||
|
wildcardSecretName: ""
|
||||||
|
Reference in New Issue
Block a user