From e76b9cc1c0bfd784d0d2314f199812f5ff7fa6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n=20Garc=C3=ADa?= Date: Wed, 7 May 2025 12:56:57 +0200 Subject: [PATCH] [bitnami/template] chore: :recycle: Remove deprecated APIs (<1.23.0) (#33513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Javier J. Salmerón García --- template/CHART_NAME/templates/hpa.yaml | 8 -------- template/CHART_NAME/templates/ingress.yaml | 6 +----- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/template/CHART_NAME/templates/hpa.yaml b/template/CHART_NAME/templates/hpa.yaml index a2de668c5d..937e1811f3 100644 --- a/template/CHART_NAME/templates/hpa.yaml +++ b/template/CHART_NAME/templates/hpa.yaml @@ -26,24 +26,16 @@ spec: - type: Resource resource: name: memory - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetMemory }} - {{- else }} target: type: Utilization averageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetMemory }} - {{- end }} {{- end }} {{- if .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetCPU }} - type: Resource resource: name: cpu - {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} - targetAverageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetCPU }} - {{- else }} target: type: Utilization averageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetCPU }} - {{- end }} {{- end }} {{- end }} diff --git a/template/CHART_NAME/templates/ingress.yaml b/template/CHART_NAME/templates/ingress.yaml index 3d03fb5cfc..1a06e7d760 100644 --- a/template/CHART_NAME/templates/ingress.yaml +++ b/template/CHART_NAME/templates/ingress.yaml @@ -16,7 +16,7 @@ metadata: annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }} {{- end }} spec: - {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} + {{- if .Values.ingress.ingressClassName }} ingressClassName: {{ .Values.ingress.ingressClassName | quote }} {{- end }} rules: @@ -28,9 +28,7 @@ spec: {{- toYaml .Values.ingress.extraPaths | nindent 10 }} {{- end }} - path: {{ .Values.ingress.path }} - {{- if eq "true" (include "common.ingress.supportsPathType" .) }} pathType: {{ .Values.ingress.pathType }} - {{- end }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" "http" "context" $) | nindent 14 }} {{- end }} {{- range .Values.ingress.extraHosts }} @@ -38,9 +36,7 @@ spec: http: paths: - path: {{ default "/" .path }} - {{- if eq "true" (include "common.ingress.supportsPathType" $) }} pathType: {{ default "ImplementationSpecific" .pathType }} - {{- end }} backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }} {{- end }} {{- if .Values.ingress.extraRules }}