Update common.yaml
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
@@ -46,5 +46,34 @@ volumeSpec:
|
|||||||
{{- $_ := set .Values.additionalContainers "k8sgateway" (include "k8sgateway.container" . | fromYaml) -}}
|
{{- $_ := set .Values.additionalContainers "k8sgateway" (include "k8sgateway.container" . | fromYaml) -}}
|
||||||
{{- end -}}
|
{{- 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 */}}
|
{{/* Render the templates */}}
|
||||||
{{ include "tc.common.loader.apply" . }}
|
{{ include "tc.common.loader.apply" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user