Skip to content

Commit

Permalink
Merge pull request #490 from vmware-tanzu/remove-helm-hook
Browse files Browse the repository at this point in the history
[velero] Remove helm hooks for the custom resources
  • Loading branch information
qiuming-best authored Aug 17, 2023
2 parents d4e15ac + 06a6249 commit 2432de2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,35 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.1
version: v3.11.2

- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: '3.9'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
uses: helm/chart-testing-action@v2.4.0

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}

- name: Create kind cluster
uses: helm/[email protected]
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true'
with:
version: "v0.14.0"
node_image: "kindest/node:v${{ matrix.k8s }}"
# Only build a kind cluster if there are chart changes to test.
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install
- name: Run chart-testing (install+upgrade)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --upgrade --target-branch ${{ github.event.repository.default_branch }}
2 changes: 1 addition & 1 deletion charts/velero/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.11.1
kubeVersion: ">=1.16.0-0"
description: A Helm chart for velero
name: velero
version: 4.4.1
version: 5.0.0
home: https://github.com/vmware-tanzu/velero
icon: https://cdn-images-1.medium.com/max/1600/1*-9mb3AKnKdcL_QD3CMnthQ.png
sources:
Expand Down
5 changes: 0 additions & 5 deletions charts/velero/templates/backupstoragelocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ kind: BackupStorageLocation
metadata:
name: {{ .name | default "default" }}
namespace: {{ $.Release.Namespace }}
annotations:
{{- if $.Values.helmHookAnnotations }}
"helm.sh/hook": post-install,post-upgrade,post-rollback
"helm.sh/hook-delete-policy": before-hook-creation
{{- end }}
labels:
app.kubernetes.io/name: {{ include "velero.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/velero/templates/schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ metadata:
{{- if $schedule.annotations }}
{{- toYaml $schedule.annotations | nindent 4 }}
{{- end }}
{{- if $.Values.helmHookAnnotations }}
"helm.sh/hook": post-install,post-upgrade,post-rollback
"helm.sh/hook-delete-policy": before-hook-creation
{{- end }}
labels:
app.kubernetes.io/name: {{ include "velero.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
Expand Down
5 changes: 0 additions & 5 deletions charts/velero/templates/volumesnapshotlocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ kind: VolumeSnapshotLocation
metadata:
name: {{ .name | default "default" }}
namespace: {{ $.Release.Namespace }}
annotations:
{{- if $.Values.helmHookAnnotations }}
"helm.sh/hook": post-install,post-upgrade,post-rollback
"helm.sh/hook-delete-policy": before-hook-creation
{{- end }}
labels:
app.kubernetes.io/name: {{ include "velero.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/velero/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ annotations: {}
# Labels to add to the Velero deployment's. Optional.
labels: {}

# helmHookAnnotations is required to deploy CustomResources after deploying CRDs. If you manage your CRDs outside of this helm chart
# or using ArgoCD, you are able to disable the helm hooks annotations.
helmHookAnnotations: true

# Annotations to add to the Velero deployment's pod template. Optional.
#
# If using kube2iam or kiam, use the following annotation with your AWS_ACCOUNT_ID
Expand Down

0 comments on commit 2432de2

Please sign in to comment.