{{- $version := include "traefik.proxyVersion" $ }} {{- if (ne $version "experimental-v3.0") }} {{- if (semverCompare "= v3.2.0." }} {{- end }} {{- if and (semverCompare "= v3.3.0." }} {{- end }} {{- if and (semverCompare "= v3.6.0." }} {{- end }} {{- if and (semverCompare "= v3.6.2." }} {{- end }} {{- if and (semverCompare "<3.2.0-0" $version) (.Values.providers.kubernetesGateway.nativeLBByDefault)}} {{- fail "ERROR: nativeLBByDefault has been introduced in Kubernetes Gateway provider in v3.2.0" }} {{- end }} {{- if and (semverCompare "<3.5.0-0" $version) (.Values.providers.kubernetesIngress.strictPrefixMatching)}} {{- fail "ERROR: strictPrefixMatching is a feature only available for traefik >= v3.5.0." }} {{- end }} {{- if and (semverCompare "<3.5.2-0" $version) (eq .Values.logs.access.format "genericCLF")}} {{- fail "ERROR: genericCLF is an accesslog format option only available for traefik >= v3.5.2." }} {{- end }} {{- if and (semverCompare "= v3.2.0." }} {{- end }} {{- if and (semverCompare "= v3.5.3." }} {{- end }} {{- if and (not .Values.experimental.otlpLogs) (or (.Values.logs.general.otlp.enabled) (.Values.logs.access.otlp.enabled))}} {{- fail "ERROR: otlp on logs or access logs is an experimental feature and needs experimental.otlpLogs=true." }} {{- end }} {{- if and (semverCompare "= v3.3.0." }} {{- end }} {{- if and (semverCompare "= v3.3.0." }} {{- end }} {{- if and (semverCompare "= v3.1.0."}} {{- end }} {{- range $portName, $config := .Values.ports }} {{- if and (semverCompare "= v3.3.0."}} {{- end }} {{- if and (semverCompare "= v3.5.0."}} {{- end }} {{- end }} {{- if and (semverCompare "= v3.6.4." }} {{- end }} {{- if $.Values.hub.token -}} {{ $hubVersion := $.Values.oci_meta.enabled | ternary $.Values.oci_meta.images.hub.tag $.Values.image.tag }} {{ $hubVersion = ($.Values.global.azure.enabled | ternary $.Values.global.azure.images.hub.tag $hubVersion) }} {{ if not $hubVersion }} {{ fail "When using Traefik Hub image tag needs to be specified!" }} {{- end -}} {{ $hubVersion = (split "@" (default "v3" $hubVersion))._0 }} {{/* Consider non semver versions as latest one */}} {{- if not (regexMatch "v[0-9]+.[0-9]+.[0-9]+" (default "" $hubVersion)) -}} {{ $hubVersion = "v3.99" }} {{- end }} {{- if semverCompare "= v3.19.0."}} {{- end }} {{- if and (not $.Values.tracing.otlp.enabled) .Values.hub.tracing.additionalTraceHeaders.enabled }} {{ fail "ERROR: additionalTraceHeaders needs tracing.otlp to be enabled."}} {{- end }} {{- with .Values.hub.pluginRegistry.sources }} {{- range $pluginName, $pluginConf := . }} {{- if not (hasKey $.Values.experimental.plugins $pluginName) }} {{ fail (printf "ERROR: pluginRegistry source %s is not used in exprimental.plugins." $pluginName) }} {{- end }} {{- end }} {{- end }} {{- end }}