Skip to content

Commit

Permalink
fix issue when maxUnavailable was set (#130)
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Shrivastava <[email protected]>
  • Loading branch information
avaakash authored Sep 30, 2024
1 parent 41ef875 commit 69de8d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: library
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.60
version: 1.3.61

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
7 changes: 5 additions & 2 deletions src/common/templates/_pdb.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
annotations: {{- include "harnesscommon.tplvalues.render" ( dict "value" $.Values.global.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $minAvailable := "50%" }}
{{- $minAvailable := "" }}
{{- $maxUnavailable := "" }}

{{- if $.Values.global.pdb.minAvailable }}
Expand All @@ -38,9 +38,12 @@ spec:

{{- if $minAvailable }}
minAvailable: {{ $minAvailable }}
{{- end }}
{{- else }}
{{- if $maxUnavailable }}
maxUnavailable: {{ $maxUnavailable }}
{{- else }}
minAvailable: "50%"
{{- end }}
{{- end }}
{{- $selectorFunction := printf "%s.selectorLabels" (default $.Chart.Name $.Values.nameOverride) }}
selector:
Expand Down

0 comments on commit 69de8d1

Please sign in to comment.