mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
# Removed - Promtail add-on has been removed # Fixed - Fixed httpGet probe whitespace rendering (#76) - Fixed Secret management for ServiceAccounts (fixes #78) - Fixed code-server add-on Service rendering # Added - Added support for Gateway API Routes (#59) # Changed - Services and their ports are now assumed enabled by default - Updated `code-server` image to v4.8.3 - Updated `netshoot` image to v0.8 Signed-off-by: András Maróy <andras@maroy.hu> Signed-off-by: András Maróy <andras@maroy.hu> Co-authored-by: András Maróy <andras@maroy.hu> Co-authored-by: pando85 <pando855@gmail.com>
47 lines
1.6 KiB
Smarty
47 lines
1.6 KiB
Smarty
{{/*
|
|
Probes selection logic.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.container.probes" -}}
|
|
{{- $primaryService := get .Values.service (include "bjw-s.common.lib.service.primary" .) -}}
|
|
{{- $primaryPort := "" -}}
|
|
{{- if $primaryService -}}
|
|
{{- $primaryPort = get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "serviceName" (include "bjw-s.common.lib.service.primary" .) "values" $primaryService)) -}}
|
|
{{- end -}}
|
|
|
|
{{- range $probeName, $probe := .Values.probes }}
|
|
{{- if $probe.enabled -}}
|
|
{{- "" | nindent 0 }}
|
|
{{- $probeName }}Probe:
|
|
{{- if $probe.custom -}}
|
|
{{- $probe.spec | toYaml | nindent 2 }}
|
|
{{- else }}
|
|
{{- if and $primaryService $primaryPort -}}
|
|
{{- $probeType := "" -}}
|
|
{{- if eq $probe.type "AUTO" -}}
|
|
{{- $probeType = $primaryPort.protocol -}}
|
|
{{- else -}}
|
|
{{- $probeType = $probe.type | default "TCP" -}}
|
|
{{- end }}
|
|
{{- if or ( eq $probeType "HTTPS" ) ( eq $probeType "HTTP" ) }}
|
|
httpGet:
|
|
path: {{ $probe.path }}
|
|
scheme: {{ $probeType }}
|
|
{{- else }}
|
|
tcpSocket:
|
|
{{- end }}
|
|
{{- if $probe.port }}
|
|
port: {{ ( tpl ( $probe.port | toString ) $ ) }}
|
|
{{- else if $primaryPort.targetPort }}
|
|
port: {{ $primaryPort.targetPort }}
|
|
{{- else }}
|
|
port: {{ $primaryPort.port }}
|
|
{{- end }}
|
|
initialDelaySeconds: {{ $probe.spec.initialDelaySeconds }}
|
|
failureThreshold: {{ $probe.spec.failureThreshold }}
|
|
timeoutSeconds: {{ $probe.spec.timeoutSeconds }}
|
|
periodSeconds: {{ $probe.spec.periodSeconds }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|