Add pre-upgrade helm hooks to StorageClass

After the introduction of FluxCD, there have been issues on
platform-integ-apps auto re-apply on SX to DX migration.

This change adds the following helm hooks that were missing from
StorageClass:
- "helm.sh/hook": "pre-upgrade, pre-install"
- "helm.sh/hook-delete-policy": "before-hook-creation"

Test Plan:

PASS: CentOS - Create platform-integ-apps tgz with these changes and
test the migration.
PASS: Debian - Create platform-integ-apps tgz with these changes and
test the migration.

Closes-bug: 1970443

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I3aa2e8f6cbb7504f9a4bf368d90f130dd5131106
This commit is contained in:
Enzo Candotti 2022-08-29 17:54:29 -03:00
parent 4fac26a7f5
commit 48859ba190

View File

@ -1,6 +1,6 @@
{{/*
#
# Copyright (c) 2018 Wind River Systems, Inc.
# Copyright (c) 2018-2022 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -18,6 +18,8 @@ metadata:
{{- if eq $defaultSC $classConfig.name}}
annotations:
"storageclass.kubernetes.io/is-default-class": "true"
"helm.sh/hook": "pre-upgrade, pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
{{- end }}
name: {{ $classConfig.name }}
provisioner: {{ $provisioner }}