Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,16 @@ spec:
name: {{ include "coder.serviceName" . }}
port:
name: tcp-{{ include "coder.serviceName" . }}
- host: {{ merge .Values dict | dig "coderd" "devurlsHost" "" | quote }}
{{ $devURLHost := merge .Values dict | dig "coderd" "devurlsHost" "" }}
# Regex docs on '*-suffix.example.com'. This is required as the original input including the suffix is
# not a legal ingress host. We need to remove the suffic, and keep the wildcard '*'.
# - '\\*' Starts with '*'
# - '[^.]*' Suffix is 0 or more characters, '-suffix'
# - '(' Start domain capture grp
# - '\\.' The domain should be separated with a '.' from the subdomain
# - '.*' Rest of the domain.
# - ')' $1 is the ''.example.com'
- host: {{ regexReplaceAll "\\*[^.]*(\\..*)" $devURLHost "*${1}" | quote }}
http:
paths:
- path: /
Expand Down