fix: wrong removing space (#9)

This commit is contained in:
Wei-An Yen
2022-06-10 15:57:40 +08:00
committed by GitHub
parent 7284144b77
commit 54b4a74b85
4 changed files with 10 additions and 10 deletions

View File

@ -14,4 +14,4 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
version: 0.5.1 version: 0.5.2

View File

@ -10,11 +10,11 @@ spec:
{{- $cronJob := index . 1 }} {{- $cronJob := index . 1 }}
{{- $pod := index . 2 }} {{- $pod := index . 2 }}
{{- $serviceAccount := index . 3 }} {{- $serviceAccount := index . 3 }}
{{- if semverCompare ">=1.21.0" $top.Capabilities.KubeVersion.Version -}} {{- if semverCompare ">=1.21.0" $top.Capabilities.KubeVersion.Version }}
apiVersion: batch/v1 apiVersion: batch/v1
{{- else -}} {{- else }}
apiVersion: batch/v1beta1 apiVersion: batch/v1beta1
{{- end -}} {{- end }}
kind: CronJob kind: CronJob
metadata: metadata:
{{- include "common.metadata" (list $top) | nindent 2 }} {{- include "common.metadata" (list $top) | nindent 2 }}

View File

@ -3,11 +3,11 @@
{{- define "common.hpa.tpl" -}} {{- define "common.hpa.tpl" -}}
{{- $top := first . }} {{- $top := first . }}
{{- $autoscaling := index . 1 }} {{- $autoscaling := index . 1 }}
{{- if semverCompare ">=1.23.0" $top.Capabilities.KubeVersion.Version -}} {{- if semverCompare ">=1.23.0" $top.Capabilities.KubeVersion.Version }}
apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
{{- else -}} {{- else }}
apiVersion: autoscaling/v2beta2 apiVersion: autoscaling/v2beta2
{{- end -}} {{- end }}
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
{{- include "common.metadata" (list $top) | nindent 2 }} {{- include "common.metadata" (list $top) | nindent 2 }}

View File

@ -3,11 +3,11 @@
{{- define "common.pdb.tpl" -}} {{- define "common.pdb.tpl" -}}
{{- $top := first . }} {{- $top := first . }}
{{- $pdb := index . 1 }} {{- $pdb := index . 1 }}
{{- if semverCompare ">=1.21.0" $top.Capabilities.KubeVersion.Version -}} {{- if semverCompare ">=1.21.0" $top.Capabilities.KubeVersion.Version }}
apiVersion: policy/v1 apiVersion: policy/v1
{{- else -}} {{- else }}
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
{{- end -}} {{- end }}
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
{{- include "common.metadata" (list $top) | nindent 2 }} {{- include "common.metadata" (list $top) | nindent 2 }}