File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,16 @@ spec:
433433 name : {{ include "coder.serviceName" . }}
434434 port :
435435 name : tcp-{{ include "coder.serviceName" . }}
436- - host : {{ merge .Values dict | dig "coderd" "devurlsHost" "" | quote }}
436+ {{ $devURLHost := merge .Values dict | dig "coderd" "devurlsHost" "" }}
437+ # Regex docs on '*-suffix.example.com'. This is required as the original input including the suffix is
438+ # not a legal ingress host. We need to remove the suffic, and keep the wildcard '*'.
439+ # - '\\*' Starts with '*'
440+ # - '[^.]*' Suffix is 0 or more characters, '-suffix'
441+ # - '(' Start domain capture grp
442+ # - '\\.' The domain should be separated with a '.' from the subdomain
443+ # - '.*' Rest of the domain.
444+ # - ')' $1 is the ''.example.com'
445+ - host : {{ regexReplaceAll "\\*[^.]*(\\..*)" $devURLHost "*${1}" | quote }}
437446 http :
438447 paths :
439448 - path : /
You can’t perform that action at this time.
0 commit comments