Skip to content

Commit

Permalink
feat: [PL-56708]: adding service labels in PDB (#128)
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Shrivastava <[email protected]>
  • Loading branch information
avaakash authored Sep 24, 2024
1 parent f3218b6 commit 41ef875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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.59
version: 1.3.60

# 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
4 changes: 3 additions & 1 deletion src/common/templates/_pdb.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ Usage example:
{{- define "harnesscommon.pdb.renderPodDistributionBudget" -}}
{{- $ := .ctx }}
{{- if or $.Values.global.pdb.create $.Values.pdb.create }}
{{- $labelsFunction := printf "%s.labels" (default $.Chart.Name $.Values.nameOverride) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ default $.Chart.Name $.Values.nameOverride | trunc 63 | trimSuffix "-" }}
namespace: {{ $.Release.Namespace }}
labels: {{ include $labelsFunction $ | nindent 4 }}
{{- if $.Values.global.commonLabels }}
labels: {{- include "harnesscommon.tplvalues.render" ( dict "value" $.Values.global.commonLabels "context" $ ) | nindent 4 }}
{{- include "harnesscommon.tplvalues.render" ( dict "value" $.Values.global.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.global.commonAnnotations }}
annotations: {{- include "harnesscommon.tplvalues.render" ( dict "value" $.Values.global.commonAnnotations "context" $ ) | nindent 4 }}
Expand Down

0 comments on commit 41ef875

Please sign in to comment.