From 73537125ec42741dbaf35f8f9c30672ac1368879 Mon Sep 17 00:00:00 2001 From: darkobas Date: Tue, 30 Dec 2025 17:32:50 +0100 Subject: [PATCH] migrate ingress --- charts/bee-localchain/Chart.yaml | 2 +- charts/bee-localchain/templates/ingress.yaml | 4 --- charts/bee-localchain/values.yaml | 7 ++-- charts/bee/Chart.yaml | 2 +- charts/bee/templates/ingress.yaml | 32 ++---------------- charts/bee/values.yaml | 21 +++++++----- charts/beeport-ui/Chart.yaml | 2 +- .../beeport-ui/tests/ingress_domain_test.yaml | 21 ++++++++---- charts/beeport-ui/values.yaml | 8 +++-- charts/bzz-token-service/Chart.yaml | 2 +- .../bzz-token-service/templates/ingress.yaml | 4 --- charts/bzz-token-service/values.yaml | 7 ++-- charts/etherproxy/Chart.yaml | 2 +- charts/etherproxy/templates/ingress.yaml | 4 --- charts/etherproxy/values.yaml | 7 ++-- charts/ethexporter/Chart.yaml | 2 +- charts/ethexporter/templates/ingress.yaml | 33 +++++++++---------- charts/ethexporter/values.yaml | 7 ++++ charts/ethproxy/Chart.yaml | 2 +- charts/ethproxy/templates/ingress.yaml | 4 --- charts/ethproxy/values.yaml | 7 ++-- charts/geth-swap/Chart.yaml | 2 +- charts/geth-swap/templates/ingress.yaml | 4 --- charts/geth-swap/values.yaml | 7 ++-- charts/onboarding-faucet/Chart.yaml | 2 +- .../onboarding-faucet/templates/ingress.yaml | 4 --- charts/onboarding-faucet/values.yaml | 7 ++-- charts/tokenexporter/Chart.yaml | 2 +- charts/tokenexporter/templates/ingress.yaml | 33 +++++++++---------- charts/tokenexporter/values.yaml | 7 ++++ 30 files changed, 114 insertions(+), 134 deletions(-) diff --git a/charts/bee-localchain/Chart.yaml b/charts/bee-localchain/Chart.yaml index f0c3ddc..65ee5a4 100644 --- a/charts/bee-localchain/Chart.yaml +++ b/charts/bee-localchain/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: bee-localchain -version: 0.1.1 +version: 0.2.0 description: Bee localchain Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/bee-localchain/templates/ingress.yaml b/charts/bee-localchain/templates/ingress.yaml index 3ab78cf..ea4d4d0 100644 --- a/charts/bee-localchain/templates/ingress.yaml +++ b/charts/bee-localchain/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "bee-localchain.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} diff --git a/charts/bee-localchain/values.yaml b/charts/bee-localchain/values.yaml index aa643dc..a213b53 100644 --- a/charts/bee-localchain/values.yaml +++ b/charts/bee-localchain/values.yaml @@ -43,9 +43,10 @@ service: ingress: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - class: "" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" hosts: - host: chart-example.local paths: [] diff --git a/charts/bee/Chart.yaml b/charts/bee/Chart.yaml index 58c5506..dd587d0 100644 --- a/charts/bee/Chart.yaml +++ b/charts/bee/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: 2.5.0 name: bee -version: 0.16.15 +version: 0.17.0 kubeVersion: ">=1.19.0-0" description: Ethereum Swarm Bee Helm chart for Kubernetes home: https://www.ethswarm.org diff --git a/charts/bee/templates/ingress.yaml b/charts/bee/templates/ingress.yaml index b5c8e11..06670c2 100644 --- a/charts/bee/templates/ingress.yaml +++ b/charts/bee/templates/ingress.yaml @@ -6,11 +6,7 @@ # MAIN INGRESS --- -{{- if semverCompare ">=1.19-0" $root.Capabilities.KubeVersion.Version }} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: networking.k8s.io/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} @@ -22,9 +18,10 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + ingressClassName: {{ $root.Values.ingress.ingressClassName }} {{- if $root.Values.ingress.tls }} tls: - {{- range $root.Values.ingress.hosts }} + {{- range $root.Values.ingress.hosts }} - hosts: {{- if .domain }} - {{ $fullName }}.{{ .domain }} @@ -35,9 +32,6 @@ spec: secretName: {{ .tlsSecret }} {{- end }} {{- end }} -{{- end }} -{{- if semverCompare ">=1.18-0" $root.Capabilities.KubeVersion.Version }} - ingressClassName: {{ $root.Values.ingress.ingressClassName }} {{- end }} rules: {{- range $root.Values.ingress.hosts }} @@ -50,30 +44,19 @@ spec: paths: {{- range .paths }} - path: {{ . }} - {{- if semverCompare ">=1.18-0" $root.Capabilities.KubeVersion.Version }} pathType: {{ $root.Values.ingress.pathType }} - {{- end }} backend: - {{- if semverCompare ">=1.19-0" $root.Capabilities.KubeVersion.Version }} service: name: {{ $fullName }} port: number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} {{- end }} {{- end }} # PER POD INGRESS {{- range $i, $e := until (int $root.Values.replicaCount) }} --- -{{- if semverCompare ">=1.19-0" $root.Capabilities.KubeVersion.Version }} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: networking.k8s.io/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }}-{{ $i }} @@ -85,6 +68,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + ingressClassName: {{ $root.Values.ingress.ingressClassName }} {{- if $root.Values.ingress.tls }} tls: {{- range $root.Values.ingress.hosts }} @@ -98,9 +82,6 @@ spec: secretName: {{ .tlsSecret }} {{- end }} {{- end }} -{{- end }} -{{- if semverCompare ">=1.18-0" $root.Capabilities.KubeVersion.Version }} - ingressClassName: {{ $root.Values.ingress.ingressClassName }} {{- end }} rules: {{- range $root.Values.ingress.hosts }} @@ -113,19 +94,12 @@ spec: paths: {{- range .paths }} - path: {{ . }} - {{- if semverCompare ">=1.18-0" $root.Capabilities.KubeVersion.Version }} pathType: {{ $root.Values.ingress.pathType }} - {{- end }} backend: - {{- if semverCompare ">=1.19-0" $root.Capabilities.KubeVersion.Version }} service: name: {{ $fullName }}-{{ $i }} port: name: api - {{- else }} - serviceName: {{ $fullName }}-{{ $i }} - servicePort: api - {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/charts/bee/values.yaml b/charts/bee/values.yaml index 6a68f10..b14cc0e 100644 --- a/charts/bee/values.yaml +++ b/charts/bee/values.yaml @@ -70,10 +70,11 @@ ingress: enabled: false ## Used if cluster version is >= 1.19-0 pathType: ImplementationSpecific - # ingressClassName: ingress-nginx + ingressClassName: nginx annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" hosts: - domain: "" paths: [] @@ -281,10 +282,11 @@ gatewayProxy: enabled: false ## Used if cluster version is >= 1.19-0 pathType: ImplementationSpecific - # ingressClassName: ingress-nginx + ingressClassName: nginx annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" hosts: - domain: "" paths: [] @@ -332,10 +334,11 @@ swarmProxy: enabled: false ## Used if cluster version is >= 1.19-0 pathType: ImplementationSpecific - # ingressClassName: ingress-nginx + ingressClassName: nginx annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" hosts: - domain: "" paths: [] diff --git a/charts/beeport-ui/Chart.yaml b/charts/beeport-ui/Chart.yaml index 030c755..527286f 100644 --- a/charts/beeport-ui/Chart.yaml +++ b/charts/beeport-ui/Chart.yaml @@ -6,7 +6,7 @@ dependencies: description: Chart to build and deploy beeport-ui name: beeport-ui type: application -version: 0.73.3 +version: 0.74.0 home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg keywords: diff --git a/charts/beeport-ui/tests/ingress_domain_test.yaml b/charts/beeport-ui/tests/ingress_domain_test.yaml index a072a7f..8217e64 100644 --- a/charts/beeport-ui/tests/ingress_domain_test.yaml +++ b/charts/beeport-ui/tests/ingress_domain_test.yaml @@ -76,11 +76,13 @@ tests: set: ingresses: - host: chart-example.local + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/client-max-body-size: "0" - host: another.local + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/client-max-body-size: "0" asserts: - hasDocuments: count: 2 @@ -88,15 +90,18 @@ tests: set: ingress: host: chart-example.local + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/proxy-read-timeout: "60s" ingresses: - host: chart-example.local + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/proxy-read-timeout: "60s" - host: another.local + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/proxy-read-timeout: "60s" asserts: - hasDocuments: count: 3 @@ -105,12 +110,14 @@ tests: ingresses: - host: chart-example.local tlsEnabled: true + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/redirect-to-https: "true" - host: another.local tlsEnabled: true + ingressClassName: nginx annotations: - kubernetes.io/ingress.class: nginx + nginx.org/redirect-to-https: "true" asserts: - template: ingress.yaml documentIndex: 0 diff --git a/charts/beeport-ui/values.yaml b/charts/beeport-ui/values.yaml index 68a05c7..991dd9b 100644 --- a/charts/beeport-ui/values.yaml +++ b/charts/beeport-ui/values.yaml @@ -31,10 +31,12 @@ service: port: 8080 ingress: - # className: "" + ingressClassName: "nginx" annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + # nginx.org/websocket-services: "beeport-ui" host: "app.ethswarm.org" tlsEnabled: false diff --git a/charts/bzz-token-service/Chart.yaml b/charts/bzz-token-service/Chart.yaml index d9e492c..6761be5 100644 --- a/charts/bzz-token-service/Chart.yaml +++ b/charts/bzz-token-service/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: bzz-token-service -version: 0.1.1 +version: 0.2.0 description: BZZ Token Service Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/bzz-token-service/templates/ingress.yaml b/charts/bzz-token-service/templates/ingress.yaml index 9fd4d92..6f06d9d 100644 --- a/charts/bzz-token-service/templates/ingress.yaml +++ b/charts/bzz-token-service/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "bzz-token-service.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} diff --git a/charts/bzz-token-service/values.yaml b/charts/bzz-token-service/values.yaml index 5803609..e954326 100644 --- a/charts/bzz-token-service/values.yaml +++ b/charts/bzz-token-service/values.yaml @@ -43,9 +43,10 @@ service: ingress: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - class: "" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" hosts: - host: chart-example.local paths: [] diff --git a/charts/etherproxy/Chart.yaml b/charts/etherproxy/Chart.yaml index 3f4fe9d..cf1e1c4 100644 --- a/charts/etherproxy/Chart.yaml +++ b/charts/etherproxy/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: etherproxy -version: 0.1.0 +version: 0.2.0 description: EtherProxy Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/etherproxy/templates/ingress.yaml b/charts/etherproxy/templates/ingress.yaml index 9116bd5..11b325c 100644 --- a/charts/etherproxy/templates/ingress.yaml +++ b/charts/etherproxy/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "etherproxy.fullname" . -}} {{- $svcPort := .Values.service.portAPI -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} diff --git a/charts/etherproxy/values.yaml b/charts/etherproxy/values.yaml index aae5fb6..ba82137 100644 --- a/charts/etherproxy/values.yaml +++ b/charts/etherproxy/values.yaml @@ -43,9 +43,10 @@ service: ingress: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - class: "" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" hosts: - host: chart-example.local paths: [] diff --git a/charts/ethexporter/Chart.yaml b/charts/ethexporter/Chart.yaml index 00e0d14..8a65e1a 100644 --- a/charts/ethexporter/Chart.yaml +++ b/charts/ethexporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: ethexporter -version: 0.2.1 +version: 0.3.0 description: ETHexporter Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/ethexporter/templates/ingress.yaml b/charts/ethexporter/templates/ingress.yaml index 292991a..71f55b4 100644 --- a/charts/ethexporter/templates/ingress.yaml +++ b/charts/ethexporter/templates/ingress.yaml @@ -1,12 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "ethexporter.fullname" . -}} {{- $svcPort := .Values.service.port -}} ---- -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -17,26 +12,30 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- if .Values.ingress.tls }} + ingressClassName: {{ .Values.ingress.class }} + {{- if .Values.ingress.tls }} tls: - {{- range .Values.ingress.tls }} + {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} + {{- range .hosts }} - {{ . | quote }} - {{- end }} + {{- end }} secretName: {{ .secretName }} + {{- end }} {{- end }} -{{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - {{- range .paths }} + {{- range .paths }} - path: {{ . }} + pathType: ImplementationSpecific backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/ethexporter/values.yaml b/charts/ethexporter/values.yaml index 84db7f2..99f420e 100644 --- a/charts/ethexporter/values.yaml +++ b/charts/ethexporter/values.yaml @@ -44,6 +44,13 @@ service: ingress: enabled: false annotations: {} + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" + hosts: + - host: chart-example.local + paths: [] tls: [] resources: {} diff --git a/charts/ethproxy/Chart.yaml b/charts/ethproxy/Chart.yaml index d18decb..72d41f6 100644 --- a/charts/ethproxy/Chart.yaml +++ b/charts/ethproxy/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: ethproxy -version: 0.1.3 +version: 0.2.0 description: ETHproxy Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/ethproxy/templates/ingress.yaml b/charts/ethproxy/templates/ingress.yaml index 0083bf7..56c601c 100644 --- a/charts/ethproxy/templates/ingress.yaml +++ b/charts/ethproxy/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "ethproxy.fullname" . -}} {{- $svcPort := .Values.service.portAPI -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} diff --git a/charts/ethproxy/values.yaml b/charts/ethproxy/values.yaml index 542127d..e5f984b 100644 --- a/charts/ethproxy/values.yaml +++ b/charts/ethproxy/values.yaml @@ -44,9 +44,10 @@ service: ingress: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - class: "" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" hosts: - host: chart-example.local paths: [] diff --git a/charts/geth-swap/Chart.yaml b/charts/geth-swap/Chart.yaml index 7d08a9a..cc2a958 100644 --- a/charts/geth-swap/Chart.yaml +++ b/charts/geth-swap/Chart.yaml @@ -20,7 +20,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.5.0 +version: 0.6.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/geth-swap/templates/ingress.yaml b/charts/geth-swap/templates/ingress.yaml index d5b4cad..555dc04 100644 --- a/charts/geth-swap/templates/ingress.yaml +++ b/charts/geth-swap/templates/ingress.yaml @@ -26,11 +26,7 @@ spec: {{- end }} {{- end }} {{- else -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} diff --git a/charts/geth-swap/values.yaml b/charts/geth-swap/values.yaml index 5910f60..d6bb3db 100644 --- a/charts/geth-swap/values.yaml +++ b/charts/geth-swap/values.yaml @@ -74,9 +74,10 @@ extraInitContainers: [] ingress: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - class: "" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" hosts: - host: chart-example.local paths: [] diff --git a/charts/onboarding-faucet/Chart.yaml b/charts/onboarding-faucet/Chart.yaml index e693dae..04308a8 100644 --- a/charts/onboarding-faucet/Chart.yaml +++ b/charts/onboarding-faucet/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: onboarding-faucet -version: 0.1.4 +version: 0.2.0 description: Onboarding faucet Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/onboarding-faucet/templates/ingress.yaml b/charts/onboarding-faucet/templates/ingress.yaml index 511f1ed..46cd4d6 100644 --- a/charts/onboarding-faucet/templates/ingress.yaml +++ b/charts/onboarding-faucet/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "onboarding-faucet.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} apiVersion: networking.k8s.io/v1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} diff --git a/charts/onboarding-faucet/values.yaml b/charts/onboarding-faucet/values.yaml index 6aff4ad..940ccd8 100644 --- a/charts/onboarding-faucet/values.yaml +++ b/charts/onboarding-faucet/values.yaml @@ -43,9 +43,10 @@ service: ingress: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - class: "" + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" hosts: - host: chart-example.local paths: [] diff --git a/charts/tokenexporter/Chart.yaml b/charts/tokenexporter/Chart.yaml index ca5a64b..0b587d2 100644 --- a/charts/tokenexporter/Chart.yaml +++ b/charts/tokenexporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: latest name: tokenexporter -version: 0.2.1 +version: 0.3.0 description: Tokenexporter Helm chart for Kubernetes home: https://www.ethswarm.org icon: https://docs.ethswarm.org/img/swarm-logo-2.svg diff --git a/charts/tokenexporter/templates/ingress.yaml b/charts/tokenexporter/templates/ingress.yaml index 521b2f8..9fe4ba3 100644 --- a/charts/tokenexporter/templates/ingress.yaml +++ b/charts/tokenexporter/templates/ingress.yaml @@ -1,12 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "tokenexporter.fullname" . -}} {{- $svcPort := .Values.service.port -}} ---- -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -17,26 +12,30 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- if .Values.ingress.tls }} + ingressClassName: {{ .Values.ingress.class }} + {{- if .Values.ingress.tls }} tls: - {{- range .Values.ingress.tls }} + {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} + {{- range .hosts }} - {{ . | quote }} - {{- end }} + {{- end }} secretName: {{ .secretName }} + {{- end }} {{- end }} -{{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - {{- range .paths }} + {{- range .paths }} - path: {{ . }} + pathType: ImplementationSpecific backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/tokenexporter/values.yaml b/charts/tokenexporter/values.yaml index 41683af..bb888f6 100644 --- a/charts/tokenexporter/values.yaml +++ b/charts/tokenexporter/values.yaml @@ -56,6 +56,13 @@ service: ingress: enabled: false annotations: {} + # nginx.org/client-max-body-size: "0" + # nginx.org/proxy-connect-timeout: "60s" + # nginx.org/proxy-read-timeout: "60s" + class: "nginx" + hosts: + - host: chart-example.local + paths: [] tls: [] resources: {}