Update common.yaml
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
parent
497d459134
commit
00b22662a3
|
@ -46,5 +46,34 @@ volumeSpec:
|
|||
{{- $_ := set .Values.additionalContainers "k8sgateway" (include "k8sgateway.container" . | fromYaml) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Define path for api */}}
|
||||
{{- define "blocky.api" -}}
|
||||
{{- $fullname := include "tc.common.names.fullname" . -}}
|
||||
path: "/api"
|
||||
# -- Ignored if not kubeVersion >= 1.14-0
|
||||
pathType: Prefix
|
||||
service:
|
||||
# -- Overrides the service name reference for this path
|
||||
name: {{ printf "%s-http" $fullname }}
|
||||
port: {{ .Values.service.http.ports.http.port }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* inject websocket path to all main ingress hosts*/}}
|
||||
{{- define "blocky.apiinjector" -}}
|
||||
{{- $path := list (include "blocky.api" . | fromYaml) -}}
|
||||
{{- if .Values.ingress.main.enabled }}
|
||||
{{- range .Values.ingress.main.hosts }}
|
||||
{{- $newpaths := list }}
|
||||
{{- $newpaths := concat .paths $path }}
|
||||
{{- $_ := set . "paths" ( deepCopy $newpaths ) -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* inject api paths in ingress */}}
|
||||
{{- if .Values.blocky.apiIngress -}}
|
||||
{{- include "blocky.apiinjector" . }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "tc.common.loader.apply" . }}
|
||||
|
|
Loading…
Reference in New Issue