Skip to content

Commit

Permalink
codegen: fix to prevent null strategy (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samu committed Apr 26, 2024
1 parent 107faa1 commit 9fd0190
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions changelog/v0.38.6/fix-conditional-strategy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
changelog:
- type: FIX
issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/15710
resolvesIssue: false
description: |
Avoid setting deployment strategy to null when no condition is evaluated.
skipCI: false
2 changes: 1 addition & 1 deletion codegen/templates/chart/operator-deployment.yamltmpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ spec:
strategy:
[[ toYaml $strategy | indent 4 ]]
[[- else if $conditionalStrategy ]]
strategy:
[[- range $s := $conditionalStrategy ]]
{{- if [[ $s.Condition ]] }}
strategy:
[[ toYaml $s.Strategy | indent 4 ]]
{{- end }}
[[- end ]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ spec:
selector:
matchLabels:
app: painter
strategy:
{{- if $.Values.painter.condition }}
strategy:
type: RollingUpdate
{{- end }}
{{- if not $.Values.painter.condition }}
strategy:
type: Recreate
{{- end }}
template:
Expand Down

0 comments on commit 9fd0190

Please sign in to comment.