feat(common): add autolinking opion to ingress (#1922)
* feat(common): add autolinking opion to ingress * bump
This commit is contained in:
@@ -8,6 +8,12 @@ service:
|
|||||||
ports:
|
ports:
|
||||||
main:
|
main:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
autolink:
|
||||||
|
enabled: true
|
||||||
|
ports:
|
||||||
|
autolink:
|
||||||
|
enabled: true
|
||||||
|
port: 8081
|
||||||
|
|
||||||
args:
|
args:
|
||||||
- --port
|
- --port
|
||||||
@@ -71,6 +77,21 @@ ingress:
|
|||||||
port:
|
port:
|
||||||
tls: []
|
tls: []
|
||||||
|
|
||||||
|
autolink:
|
||||||
|
enabled: true
|
||||||
|
fixedMiddlewares:
|
||||||
|
- chain-basic
|
||||||
|
hosts:
|
||||||
|
- host: label.chart-example.local
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
service:
|
||||||
|
name:
|
||||||
|
port:
|
||||||
|
tls: []
|
||||||
|
autoLink: true
|
||||||
|
|
||||||
labellist:
|
labellist:
|
||||||
enabled: true
|
enabled: true
|
||||||
nameOverride:
|
nameOverride:
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ maintainers:
|
|||||||
name: common
|
name: common
|
||||||
sources: null
|
sources: null
|
||||||
type: library
|
type: library
|
||||||
version: 8.15.4
|
version: 8.16.0
|
||||||
|
|||||||
@@ -18,12 +18,20 @@ within the common library.
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $primaryService := get .Values.service (include "common.service.primary" .) -}}
|
{{- $primaryService := get .Values.service (include "common.service.primary" .) -}}
|
||||||
|
{{- $autoLinkService := get .Values.service (include "common.service.primary" .) -}}
|
||||||
{{- $defaultServiceName := $fullName -}}
|
{{- $defaultServiceName := $fullName -}}
|
||||||
{{- if and (hasKey $primaryService "nameOverride") $primaryService.nameOverride -}}
|
{{- if and (hasKey $primaryService "nameOverride") $primaryService.nameOverride -}}
|
||||||
{{- $defaultServiceName = printf "%v-%v" $defaultServiceName $primaryService.nameOverride -}}
|
{{- $defaultServiceName = printf "%v-%v" $defaultServiceName $primaryService.nameOverride -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $defaultServicePort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
|
{{- $defaultServicePort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
|
||||||
|
|
||||||
|
{{- if and (hasKey $values "nameOverride") ( $values.nameOverride ) ( $values.autoLink ) -}}
|
||||||
|
{{- $autoLinkService = get .Values.service $values.nameOverride -}}
|
||||||
|
{{- $defaultServiceName = $ingressName -}}
|
||||||
|
{{- $defaultServicePort = get $autoLinkService.ports $values.nameOverride -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
{{- $isStable := include "common.capabilities.ingress.isStable" . }}
|
{{- $isStable := include "common.capabilities.ingress.isStable" . }}
|
||||||
|
|
||||||
{{- $mddwrNamespace := "default" }}
|
{{- $mddwrNamespace := "default" }}
|
||||||
|
|||||||
@@ -530,6 +530,9 @@ ingress:
|
|||||||
# -- Override the name suffix that is used for this ingress.
|
# -- Override the name suffix that is used for this ingress.
|
||||||
nameOverride:
|
nameOverride:
|
||||||
|
|
||||||
|
# -- Autolink the ingress to a service and port, both with the same name as the ingress.
|
||||||
|
autoLink: false
|
||||||
|
|
||||||
# -- disable to ignore any default middlwares
|
# -- disable to ignore any default middlwares
|
||||||
enableFixedMiddlewares: true
|
enableFixedMiddlewares: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user