Skip to content

Commit 556f1eb

Browse files
[agent-control] fix: skip chart uninstall if not exists (NR-490719) (#2038)
- Skips chart uninstall if not exist to unblock uninstallation job
1 parent a96e914 commit 556f1eb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

charts/agent-control-bootstrap/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: agent-control-bootstrap
33
description: Bootstraps New Relic' Agent Control
44

55
type: application
6-
version: 1.0.8
6+
version: 1.0.9
77
# agent-control-deployment chart default version.
88
appVersion: 1.0.6
99
annotations:

charts/agent-control-bootstrap/templates/uninstallation-job.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ spec:
4444
--log-level "{{ .Values.uninstallation.log.level }}" \
4545
--release-name={{ .Values.agentControlCd.releaseName }}
4646
echo "uninstalling agent-control-cd chart..."
47-
helm uninstall {{ .Values.agentControlCd.releaseName }} --namespace {{ .Release.Namespace }}
47+
if helm status {{ .Values.agentControlCd.releaseName }} --namespace {{ .Release.Namespace }}; then
48+
helm uninstall {{ .Values.agentControlCd.releaseName }} --namespace {{ .Release.Namespace }}
49+
fi
4850
{{- end }}
4951
{{- end -}}

0 commit comments

Comments
 (0)