From e9609bfa9835871d8e23334fb37da6434d061cf5 Mon Sep 17 00:00:00 2001 From: Omega Zeng <omegazeng@gmail.com> Date: Fri, 21 Jan 2022 00:42:37 +0800 Subject: [PATCH] fix: #809 (#810) Co-authored-by: zengdongren <zengdongren@laiye.com> --- charts/wordpress/Chart.yaml | 2 +- charts/wordpress/README.md | 4 ++-- charts/wordpress/templates/ingress.yaml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/wordpress/Chart.yaml b/charts/wordpress/Chart.yaml index 102aa577..2872cc69 100644 --- a/charts/wordpress/Chart.yaml +++ b/charts/wordpress/Chart.yaml @@ -8,7 +8,7 @@ maintainers: type: application # This is the chart version. -version: 0.4.7 +version: 0.4.8 # This is the version number of the application being deployed. appVersion: "5.8.3-apache" diff --git a/charts/wordpress/README.md b/charts/wordpress/README.md index be497fcd..4ada1d2e 100644 --- a/charts/wordpress/README.md +++ b/charts/wordpress/README.md @@ -1,6 +1,6 @@ # Wordpress -   +   A Helm chart for Wordpress on Kubernetes @@ -141,4 +141,4 @@ $ helm uninstall my-release | storage.persistentVolumeClaimName | string | `nil` | PVC name when existing storage volume should be used | | storage.requestedSize | string | `nil` | Size for new PVC, when no existing PVC is used | | storage.className | string | `nil` | Storage class name | -| storage.keepPvc | bool | `false` | Keep a created Persistent volume claim when uninstalling the helm chart | \ No newline at end of file +| storage.keepPvc | bool | `false` | Keep a created Persistent volume claim when uninstalling the helm chart | diff --git a/charts/wordpress/templates/ingress.yaml b/charts/wordpress/templates/ingress.yaml index b0712e95..10c3d250 100644 --- a/charts/wordpress/templates/ingress.yaml +++ b/charts/wordpress/templates/ingress.yaml @@ -2,11 +2,11 @@ {{- $fullName := include "wordpress.fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- $maxSize := .Values.ingress.maxBodySize -}} -{{- $kubeVersion := .Capabilities.KubeVersion.Version -}} -{{- if semverCompare ">=1.19" $kubeVersion }} +{{- $apiVersion := .Capabilities.APIVersions -}} +{{- if $apiVersion.Has "networking.k8s.io/v1" }} apiVersion: networking.k8s.io/v1 {{- else }} -{{- if semverCompare ">=1.14" $kubeVersion }} +{{- if $apiVersion.Has "networking.k8s.io/v1beta1" }} apiVersion: networking.k8s.io/v1beta1 {{- else }} apiVersion: extensions/v1beta1 @@ -40,7 +40,7 @@ spec: paths: {{- range .paths }} - path: {{ .path }} - {{- if semverCompare ">=1.19" $kubeVersion }} + {{- if $apiVersion.Has "networking.k8s.io/v1" }} pathType: {{ .pathType }} backend: service: -- GitLab