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:
committed by
GitHub
parent
e4794ca02b
commit
224efec466
@@ -18,4 +18,4 @@ maintainers:
|
||||
name: common
|
||||
sources:
|
||||
type: library
|
||||
version: 6.5.1
|
||||
version: 6.5.2
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
{{- $protocol := "https" }}
|
||||
{{- $portProtocol := "" }}
|
||||
{{- $path := "/" }}
|
||||
{{- $ingressport := 443 }}
|
||||
|
||||
{{- if $ingr }}
|
||||
{{- if $ingr.enabled }}
|
||||
@@ -28,8 +29,17 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if and ( .Values.portal.ingressPort ) ( ne $host "$node_ip" ) }}
|
||||
{{- $port = .Values.portal.ingressPort }}
|
||||
{{- $traefikportalhook := lookup "v1" "ConfigMap" "traefikmiddlewares" "portalhook" }}
|
||||
{{- 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" }}
|
||||
{{- if eq $primaryService.type "NodePort" }}
|
||||
{{- $port = $primaryPort.nodePort }}
|
||||
|
||||
@@ -26,4 +26,4 @@ sources:
|
||||
- https://traefik.io/
|
||||
type: application
|
||||
upstream_version: v9.19.2
|
||||
version: 6.5.4
|
||||
version: 6.5.5
|
||||
|
||||
@@ -327,3 +327,6 @@ priorityClassName: ""
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
|
||||
portalhook:
|
||||
enabled: true
|
||||
|
||||
@@ -11,6 +11,6 @@ spec:
|
||||
chain:
|
||||
middlewares:
|
||||
{{ range $index, $chainData := .Values.middlewares.chainmiddlewares }}
|
||||
- name: {{ $chainData.name }}
|
||||
- name: {{ printf "%v-%v@%v" "traefikmiddlewares" $chainData.name "kubernetescrd" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
12
charts/stable/traefik/templates/custom/portalhook.yaml
Normal file
12
charts/stable/traefik/templates/custom/portalhook.yaml
Normal file
@@ -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: []
|
||||
# average: 300
|
||||
# burst: 200
|
||||
|
||||
portalhook:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user