Skip to content

Commit 9c80ef7

Browse files
authored
refactor: Use recommended "default" function syntax in helm templates (#750)
**What problem does this PR solve?**: **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent b81750e commit 9c80ef7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

charts/cluster-api-runtime-extensions-nutanix/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ spec:
2525
terminationGracePeriodSeconds: 10
2626
containers:
2727
- name: webhook
28-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default $.Chart.AppVersion }}"
28+
image: "{{ .Values.image.repository }}:{{ default $.Chart.AppVersion .Values.image.tag }}"
2929
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
3030
args:
3131
- --webhook-cert-dir=/runtimehooks-certs/
3232
- --defaults-namespace=$(POD_NAMESPACE)
3333
- --namespacesync-enabled={{ .Values.namespaceSync.enabled }}
34-
- --namespacesync-source-namespace={{ .Values.namespaceSync.sourceNamespace | default .Release.Namespace }}
34+
- --namespacesync-source-namespace={{ default .Release.Namespace .Values.namespaceSync.sourceNamespace }}
3535
- --namespacesync-target-namespace-label-key={{ .Values.namespaceSync.targetNamespaceLabelKey }}
3636
- --helm-addons-configmap={{ .Values.helmAddonsConfigMap }}
3737
- --cni.cilium.helm-addon.default-values-template-configmap-name={{ .Values.hooks.cni.cilium.helmAddonStrategy.defaultValueTemplateConfigMap.name }}

charts/cluster-api-runtime-extensions-nutanix/templates/helm-repository.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
- name: serve
5252
protocol: TCP
5353
containerPort: 5000
54-
image: "{{ .Values.helmRepositoryImage.repository }}:{{ .Values.helmRepositoryImage.tag | default $.Chart.AppVersion }}"
54+
image: "{{ .Values.helmRepositoryImage.repository }}:{{ default $.Chart.AppVersion .Values.helmRepositoryImage.tag }}"
5555
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
5656
volumeMounts:
5757
- name: certs-vol

0 commit comments

Comments
 (0)