mirror of
https://github.com/truenas/charts.git
synced 2024-04-21 15:21:45 +00:00
fix nil pointers
This commit is contained in:
@@ -14,6 +14,9 @@ revisionHistoryLimit: {{ $objectData.revisionHistoryLimit | default 3 }}
|
||||
updateStrategy:
|
||||
type: {{ $objectData.strategy | default "RollingUpdate" }}
|
||||
{{- if eq $objectData.strategy "RollingUpdate" }}
|
||||
{{- if not $objectData.rollingUpdate -}} {{/* Create the key if it does not exist, to avoid nil pointers */}}
|
||||
{{- $_ := set $objectData "rollingUpdate" dict -}}
|
||||
{{- end }}
|
||||
rollingUpdate:
|
||||
maxUnavailable: {{ $objectData.rollingUpdate.maxUnavailable | default $rootCtx.Values.fallbackDefaults.maxUnavailable }}
|
||||
maxSurge: {{ $objectData.rollingUpdate.maxSurge | default $rootCtx.Values.fallbackDefaults.maxSurge }}
|
||||
|
||||
@@ -15,6 +15,9 @@ revisionHistoryLimit: {{ $objectData.revisionHistoryLimit | default 3 }}
|
||||
strategy:
|
||||
type: {{ $objectData.strategy | default "Recreate" }}
|
||||
{{- if eq $objectData.strategy "RollingUpdate" }}
|
||||
{{- if not $objectData.rollingUpdate -}} {{/* Create the key if it does not exist, to avoid nil pointers */}}
|
||||
{{- $_ := set $objectData "rollingUpdate" dict -}}
|
||||
{{- end }}
|
||||
rollingUpdate:
|
||||
maxUnavailable: {{ $objectData.rollingUpdate.maxUnavailable | default $rootCtx.Values.fallbackDefaults.maxUnavailable }}
|
||||
maxSurge: {{ $objectData.rollingUpdate.maxSurge | default $rootCtx.Values.fallbackDefaults.maxSurge }}
|
||||
|
||||
@@ -17,6 +17,9 @@ updateStrategy:
|
||||
type: {{ $objectData.strategy | default "RollingUpdate" }}
|
||||
{{- if eq $objectData.strategy "RollingUpdate" }}
|
||||
rollingUpdate:
|
||||
{{- if not $objectData.rollingUpdate -}} {{/* Create the key if it does not exist, to avoid nil pointers */}}
|
||||
{{- $_ := set $objectData "rollingUpdate" dict -}}
|
||||
{{- end }}
|
||||
maxUnavailable: {{ $objectData.rollingUpdate.maxUnavailable | default $rootCtx.Values.fallbackDefaults.maxUnavailable }}
|
||||
partition: {{ $objectData.rollingUpdate.partition | default $rootCtx.Values.fallbackDefaults.partition }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user