try to fix 3.9.4 helm

This commit is contained in:
Stavros kois
2023-02-13 20:57:42 +02:00
parent a424e56cf5
commit 498461643b
3 changed files with 18 additions and 21 deletions

View File

@@ -14,16 +14,15 @@ objectData:
revisionHistoryLimit: {{ $objectData.revisionHistoryLimit | default 3 }}
updateStrategy:
type: {{ $strategy }}
{{- if and
(eq $objectData.strategy "RollingUpdate")
$objectData.rollingUpdate
(or (hasKey $objectData.rollingUpdate "maxUnavailable") (hasKey $objectData.rollingUpdate "maxSurge")) }}
{{- if and (eq $objectData.strategy "RollingUpdate") $objectData.rollingUpdate -}}
{{ if (or (hasKey $objectData.rollingUpdate "maxUnavailable") (hasKey $objectData.rollingUpdate "maxSurge")) }}
rollingUpdate:
{{- if hasKey $objectData.rollingUpdate "maxUnavailable" }}
{{- if hasKey $objectData.rollingUpdate "maxUnavailable" }}
maxUnavailable: {{ $objectData.rollingUpdate.maxUnavailable }}
{{- end -}}
{{- if hasKey $objectData.rollingUpdate "maxSurge" }}
{{- end -}}
{{- if hasKey $objectData.rollingUpdate "maxSurge" }}
maxSurge: {{ $objectData.rollingUpdate.maxSurge }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -15,16 +15,15 @@ replicas: {{ $objectData.replicas | default 1 }}
revisionHistoryLimit: {{ $objectData.revisionHistoryLimit | default 3 }}
strategy:
type: {{ $strategy }}
{{- if and
(eq $objectData.strategy "RollingUpdate")
$objectData.rollingUpdate
(or (hasKey $objectData.rollingUpdate "maxUnavailable") (hasKey $objectData.rollingUpdate "partition")) }}
{{- if and (eq $objectData.strategy "RollingUpdate") $objectData.rollingUpdate -}}
{{ if (or (hasKey $objectData.rollingUpdate "maxUnavailable") (hasKey $objectData.rollingUpdate "maxSurge")) }}
rollingUpdate:
{{- if hasKey $objectData.rollingUpdate "maxUnavailable" }}
{{- if hasKey $objectData.rollingUpdate "maxUnavailable" }}
maxUnavailable: {{ $objectData.rollingUpdate.maxUnavailable }}
{{- end -}}
{{- if hasKey $objectData.rollingUpdate "maxSurge" }}
{{- end -}}
{{- if hasKey $objectData.rollingUpdate "maxSurge" }}
maxSurge: {{ $objectData.rollingUpdate.maxSurge }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -16,16 +16,15 @@ revisionHistoryLimit: {{ $objectData.revisionHistoryLimit | default 3 }}
serviceName: {{ $objectData.name }}
updateStrategy:
type: {{ $strategy }}
{{- if and
(eq $objectData.strategy "RollingUpdate")
$objectData.rollingUpdate
(or (hasKey $objectData.rollingUpdate "maxUnavailable") (hasKey $objectData.rollingUpdate "partition")) }}
{{- if and (eq $objectData.strategy "RollingUpdate") $objectData.rollingUpdate -}}
{{- if (or (hasKey $objectData.rollingUpdate "maxUnavailable") (hasKey $objectData.rollingUpdate "partition")) }}
rollingUpdate:
{{- if hasKey $objectData.rollingUpdate "maxUnavailable" }}
{{- if hasKey $objectData.rollingUpdate "maxUnavailable" }}
maxUnavailable: {{ $objectData.rollingUpdate.maxUnavailable }}
{{- end -}}
{{- if hasKey $objectData.rollingUpdate "partition" }}
{{- end -}}
{{- if hasKey $objectData.rollingUpdate "partition" }}
partition: {{ $objectData.rollingUpdate.partition }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}