From c3f5ca3536c9381bbb26bfa5c3870371003a348f Mon Sep 17 00:00:00 2001 From: Nicholas Malcolm Date: Thu, 9 Jan 2025 17:29:00 -0500 Subject: [PATCH 1/2] Drop 1.19 Kube version support and lower --- charts/portainer/templates/_helpers.tpl | 13 ------------- charts/portainer/templates/ingress.yaml | 16 ++-------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/charts/portainer/templates/_helpers.tpl b/charts/portainer/templates/_helpers.tpl index b428447..ecc1640 100644 --- a/charts/portainer/templates/_helpers.tpl +++ b/charts/portainer/templates/_helpers.tpl @@ -72,16 +72,3 @@ Provide a pre-defined claim or a claim based on the Release {{- template "portainer.fullname" . }} {{- end -}} {{- end -}} - -{{/* -Generate a right Ingress apiVersion -*/}} -{{- define "ingress.apiVersion" -}} -{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion -}} -networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -networking.k8s.io/v1beta1 -{{- else -}} -extensions/v1 -{{- end }} -{{- end -}} \ No newline at end of file diff --git a/charts/portainer/templates/ingress.yaml b/charts/portainer/templates/ingress.yaml index 50d51d4..a9db1ff 100644 --- a/charts/portainer/templates/ingress.yaml +++ b/charts/portainer/templates/ingress.yaml @@ -1,8 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "portainer.fullname" . -}} {{- $tlsforced := .Values.tls.force -}} -{{- $apiVersion := include "ingress.apiVersion" . -}} -apiVersion: {{ $apiVersion }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -34,11 +33,8 @@ spec: paths: {{- range .paths }} - path: {{ .path | default "/" }} - {{- if eq $apiVersion "networking.k8s.io/v1" }} pathType: Prefix - {{- end }} backend: - {{- if eq $apiVersion "networking.k8s.io/v1" }} service: name: {{ $fullName }} port: @@ -47,14 +43,6 @@ spec: {{- else }} number: {{ .port | default 9000 }} {{- end }} - {{- else }} - serviceName: {{ $fullName }} - {{- if $tlsforced }} - servicePort: {{ .port | default 9443 }} - {{- else }} - servicePort: {{ .port | default 9000 }} - {{- end }} - {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From ae90f370fe72aed5ca996be03390f5ad0de2fce1 Mon Sep 17 00:00:00 2001 From: Nicholas Malcolm Date: Thu, 9 Jan 2025 18:03:01 -0500 Subject: [PATCH 2/2] Bump chart version --- charts/portainer/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/portainer/Chart.yaml b/charts/portainer/Chart.yaml index 29df7d2..347ba13 100644 --- a/charts/portainer/Chart.yaml +++ b/charts/portainer/Chart.yaml @@ -17,7 +17,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: 1.0.59 +version: 1.0.60 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: ce-latest-ee-2.21.5