From be2a701f360319ebd34ca4410f7225db272368a9 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Fri, 3 Sep 2021 18:59:18 +0200 Subject: [PATCH] some traefik fixes --- charts/incubator/traefik/Chart.yaml | 2 +- charts/incubator/traefik/SCALE/questions.yaml | 184 +++++++++--------- .../traefik/templates/_ingressclass.tpl | 2 +- .../traefik/templates/_ingressroute.tpl | 2 +- 4 files changed, 96 insertions(+), 94 deletions(-) diff --git a/charts/incubator/traefik/Chart.yaml b/charts/incubator/traefik/Chart.yaml index 1568b73230d..2c54749a34b 100644 --- a/charts/incubator/traefik/Chart.yaml +++ b/charts/incubator/traefik/Chart.yaml @@ -22,4 +22,4 @@ sources: - https://github.com/traefik/traefik-helm-chart - https://traefik.io/ type: application -version: 0.0.3 +version: 0.0.4 diff --git a/charts/incubator/traefik/SCALE/questions.yaml b/charts/incubator/traefik/SCALE/questions.yaml index 0fba2d046ec..5722a74f2d7 100644 --- a/charts/incubator/traefik/SCALE/questions.yaml +++ b/charts/incubator/traefik/SCALE/questions.yaml @@ -57,7 +57,7 @@ questions: label: "(Advanced) Controller Type" schema: type: string - default: "daemonset" + default: "deployment" enum: - value: "deployment" description: "Deployment" @@ -280,7 +280,7 @@ questions: label: "Log Level" schema: type: string - default: "Error" + default: "ERROR" enum: - value: "INFO" description: "Info" @@ -333,41 +333,41 @@ questions: schema: type: string default: "10ms" - - variable: fields - label: "Fields" - schema: - type: dict - attrs: - - variable: general - label: "General" + - variable: fields + label: "Fields" schema: type: dict attrs: - - variable: defaultmode - label: "Default Mode" + - variable: general + label: "General" schema: - type: string - default: "keep" - enum: - - value: "keep" - description: "Keep" - - value: "drop" - description: "Drop" - - variable: headers - label: "Headers" - schema: - type: dict - attrs: - - variable: defaultmode - label: "Default Mode" + type: dict + attrs: + - variable: defaultmode + label: "Default Mode" + schema: + type: string + default: "keep" + enum: + - value: "keep" + description: "Keep" + - value: "drop" + description: "Drop" + - variable: headers + label: "Headers" schema: - type: string - default: "drop" - enum: - - value: "keep" - description: "Keep" - - value: "drop" - description: "Drop" + type: dict + attrs: + - variable: defaultmode + label: "Default Mode" + schema: + type: string + default: "drop" + enum: + - value: "keep" + description: "Keep" + - value: "drop" + description: "Drop" - variable: middlewares label: "" @@ -830,71 +830,73 @@ questions: schema: type: boolean default: false - - variable: type - label: "Service Type" - description: "ClusterIP's are only internally available, nodePorts expose the container to the host node System, Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: "LoadBalancer" - enum: - - value: "ClusterIP" - description: "ClusterIP" - - value: "LoadBalancer" - description: "LoadBalancer" - - variable: loadBalancerIP - label: "LoadBalancer IP" - description: "LoadBalancerIP" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: externalIPs - label: "External IP's" - description: "External IP's" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: list - default: [] - items: - - variable: externalIP - label: "External IP" + show_subquestions_if: true + subquestions: + - variable: type + label: "Service Type" + description: "ClusterIP's are only internally available, nodePorts expose the container to the host node System, Loadbalancer exposes the service using the system loadbalancer" schema: type: string - - variable: portsList - label: "Additional TCP Entrypoints" - schema: - type: list - default: [] - items: - - variable: portsListEntry - label: "Custom Entrypoints" + default: "LoadBalancer" + enum: + - value: "ClusterIP" + description: "ClusterIP" + - value: "LoadBalancer" + description: "LoadBalancer" + - variable: loadBalancerIP + label: "LoadBalancer IP" + description: "LoadBalancerIP" schema: - type: dict - attrs: - - variable: enabled - label: "Enable the port" - schema: - type: boolean - default: true - hidden: true - - variable: name - label: "Entrypoints Name" + show_if: [["type", "=", "LoadBalancer"]] + type: string + default: "" + - variable: externalIPs + label: "External IP's" + description: "External IP's" + schema: + show_if: [["type", "=", "LoadBalancer"]] + type: list + default: [] + items: + - variable: externalIP + label: "External IP" schema: type: string - default: "" - - variable: protocol - label: "Entrypoints Type" + - variable: portsList + label: "Additional TCP Entrypoints" + schema: + type: list + default: [] + items: + - variable: portsListEntry + label: "Custom Entrypoints" schema: - type: string - default: "UDP" - enum: - - value: UDP - description: "UDP" - - variable: port - label: "Container Port" - schema: - type: int - required: true + type: dict + attrs: + - variable: enabled + label: "Enable the port" + schema: + type: boolean + default: true + hidden: true + - variable: name + label: "Entrypoints Name" + schema: + type: string + default: "" + - variable: protocol + label: "Entrypoints Type" + schema: + type: string + default: "UDP" + enum: + - value: UDP + description: "UDP" + - variable: port + label: "Container Port" + schema: + type: int + required: true - variable: metrics label: "metrics Service" description: "The metrics Entrypoint service" diff --git a/charts/incubator/traefik/templates/_ingressclass.tpl b/charts/incubator/traefik/templates/_ingressclass.tpl index d1ac5b45210..f558e2ce8ae 100644 --- a/charts/incubator/traefik/templates/_ingressclass.tpl +++ b/charts/incubator/traefik/templates/_ingressclass.tpl @@ -1,6 +1,6 @@ {{/* Define the ingressClass */}} {{- define "traefik.ingressClass" -}} -{{- if and .Values.ingressClass.enabled }} +{{- if .Values.ingressClass.enabled }} --- kind: IngressClass metadata: diff --git a/charts/incubator/traefik/templates/_ingressroute.tpl b/charts/incubator/traefik/templates/_ingressroute.tpl index 922872618cb..e47e5916c0d 100644 --- a/charts/incubator/traefik/templates/_ingressroute.tpl +++ b/charts/incubator/traefik/templates/_ingressroute.tpl @@ -14,7 +14,7 @@ metadata: {{- include "common.labels" . | nindent 4 }} spec: entryPoints: - - traefik + - main routes: - match: PathPrefix(`/dashboard`) || PathPrefix(`/api`) kind: Rule