mirror of
https://github.com/truecharts/charts.git
synced 2026-07-15 23:04:12 -03:00
feat(traefik): allow port-based redirect and move redirect to advanced settings. (#1601)
Also moves port in the gui and removes setting targetPort by default
This commit is contained in:
committed by
GitHub
parent
2d3c09b211
commit
bcd8f0555d
@@ -584,6 +584,12 @@ questions:
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: port
|
||||
label: "Entrypoints Port"
|
||||
schema:
|
||||
type: int
|
||||
default: 9080
|
||||
required: true
|
||||
- variable: advanced
|
||||
label: "Show Advanced settings"
|
||||
schema:
|
||||
@@ -617,23 +623,26 @@ questions:
|
||||
description: "The internal(!) port on the container the Application runs on"
|
||||
schema:
|
||||
type: int
|
||||
default: 9080
|
||||
- variable: port
|
||||
label: "Entrypoints Port"
|
||||
schema:
|
||||
type: int
|
||||
default: 9080
|
||||
required: true
|
||||
- variable: redirectTo
|
||||
label: "Redirect to"
|
||||
schema:
|
||||
type: string
|
||||
default: "websecure"
|
||||
- variable: redirectPort
|
||||
label: "Redirect to Port"
|
||||
schema:
|
||||
type: int
|
||||
- variable: redirectTo
|
||||
label: "Redirect to Entrypoint"
|
||||
schema:
|
||||
type: string
|
||||
default: "websecure"
|
||||
- variable: websecure
|
||||
label: "websecure Entrypoints Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: port
|
||||
label: "Entrypoints Port"
|
||||
schema:
|
||||
type: int
|
||||
default: 9443
|
||||
required: true
|
||||
- variable: advanced
|
||||
label: "Show Advanced settings"
|
||||
schema:
|
||||
@@ -667,13 +676,14 @@ questions:
|
||||
description: "The internal(!) port on the container the Application runs on"
|
||||
schema:
|
||||
type: int
|
||||
default: 9443
|
||||
- variable: port
|
||||
label: "Entrypoints Port"
|
||||
schema:
|
||||
type: int
|
||||
default: 9443
|
||||
required: true
|
||||
- variable: redirectPort
|
||||
label: "Redirect to Port"
|
||||
schema:
|
||||
type: int
|
||||
- variable: redirectTo
|
||||
label: "Redirect to Entrypoint"
|
||||
schema:
|
||||
type: string
|
||||
- variable: tls
|
||||
label: "websecure Entrypoints Configuration"
|
||||
schema:
|
||||
@@ -736,6 +746,14 @@ questions:
|
||||
schema:
|
||||
type: boolean
|
||||
default: true
|
||||
- variable: redirectPort
|
||||
label: "Redirect to Port"
|
||||
schema:
|
||||
type: int
|
||||
- variable: redirectTo
|
||||
label: "Redirect to Entrypoint"
|
||||
schema:
|
||||
type: string
|
||||
- variable: metrics
|
||||
label: "metrics Service"
|
||||
description: "The metrics Entrypoint service"
|
||||
|
||||
@@ -68,6 +68,11 @@ args:
|
||||
{{- $toPort := index $ports $config.redirectTo }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.to=:{{ $toPort.port }}"
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.scheme=https"
|
||||
{{- else if $config.redirectPort }}
|
||||
{{ if gt $config.redirectPort 0.0 }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.to=:{{ $config.redirectPort }}"
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.scheme=https"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or ( $config.tls ) ( eq $config.protocol "HTTPS" ) }}
|
||||
{{- if or ( $config.tls.enabled ) ( eq $config.protocol "HTTPS" ) }}
|
||||
|
||||
@@ -150,6 +150,8 @@ service:
|
||||
port: 9080
|
||||
protocol: HTTP
|
||||
redirectTo: websecure
|
||||
# Options: Empty, 0 (ingore), or positive int
|
||||
# redirectPort:
|
||||
websecure:
|
||||
enabled: true
|
||||
port: 9443
|
||||
|
||||
Reference in New Issue
Block a user