Traefik fixes (#659)
* fix chain middleware for traefik * try adding portal button fix to dynamically fetch traefik port * try hook quote * correctly quote namespace name * common version bump
This commit is contained in:
@@ -18,4 +18,4 @@ maintainers:
|
|||||||
name: common
|
name: common
|
||||||
sources:
|
sources:
|
||||||
type: library
|
type: library
|
||||||
version: 6.5.1
|
version: 6.5.2
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
{{- $protocol := "https" }}
|
{{- $protocol := "https" }}
|
||||||
{{- $portProtocol := "" }}
|
{{- $portProtocol := "" }}
|
||||||
{{- $path := "/" }}
|
{{- $path := "/" }}
|
||||||
|
{{- $ingressport := 443 }}
|
||||||
|
|
||||||
{{- if $ingr }}
|
{{- if $ingr }}
|
||||||
{{- if $ingr.enabled }}
|
{{- if $ingr.enabled }}
|
||||||
@@ -28,8 +29,17 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if and ( .Values.portal.ingressPort ) ( ne $host "$node_ip" ) }}
|
{{- $traefikportalhook := lookup "v1" "ConfigMap" "traefikmiddlewares" "portalhook" }}
|
||||||
{{- $port = .Values.portal.ingressPort }}
|
{{- if .Values.portal.ingressPort }}
|
||||||
|
{{- $ingressport = .Values.portal.ingressPort }}
|
||||||
|
{{- else if $traefikportalhook }}
|
||||||
|
{{- if $traefikportalhook.data.websecureport }}
|
||||||
|
{{- $ingressport = ( index $traefikportalhook.data "websecureport" ) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if ne $host "$node_ip" }}
|
||||||
|
{{- $port = $ingressport }}
|
||||||
{{- else if eq $host "$node_ip" }}
|
{{- else if eq $host "$node_ip" }}
|
||||||
{{- if eq $primaryService.type "NodePort" }}
|
{{- if eq $primaryService.type "NodePort" }}
|
||||||
{{- $port = $primaryPort.nodePort }}
|
{{- $port = $primaryPort.nodePort }}
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ sources:
|
|||||||
- https://traefik.io/
|
- https://traefik.io/
|
||||||
type: application
|
type: application
|
||||||
upstream_version: v9.19.2
|
upstream_version: v9.19.2
|
||||||
version: 6.5.4
|
version: 6.5.5
|
||||||
|
|||||||
@@ -327,3 +327,6 @@ priorityClassName: ""
|
|||||||
securityContext:
|
securityContext:
|
||||||
capabilities:
|
capabilities:
|
||||||
drop: [ALL]
|
drop: [ALL]
|
||||||
|
|
||||||
|
portalhook:
|
||||||
|
enabled: true
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ spec:
|
|||||||
chain:
|
chain:
|
||||||
middlewares:
|
middlewares:
|
||||||
{{ range $index, $chainData := .Values.middlewares.chainmiddlewares }}
|
{{ range $index, $chainData := .Values.middlewares.chainmiddlewares }}
|
||||||
- name: {{ $chainData.name }}
|
- name: {{ printf "%v-%v@%v" "traefikmiddlewares" $chainData.name "kubernetescrd" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{{- if .Values.portalhook.enabled }}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: portalhook
|
||||||
|
namespace: traefikmiddlewares
|
||||||
|
data:
|
||||||
|
websecureport: {{ .Values.ports.websecure.exposedPort | quote }}
|
||||||
|
{{- end }}
|
||||||
@@ -433,3 +433,6 @@ middlewares:
|
|||||||
rateLimit: []
|
rateLimit: []
|
||||||
# average: 300
|
# average: 300
|
||||||
# burst: 200
|
# burst: 200
|
||||||
|
|
||||||
|
portalhook:
|
||||||
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user