Skip to content

Commit

Permalink
[stable/minio] Add hook-delete-policy (#2655)
Browse files Browse the repository at this point in the history
* [stable/minio] Add hook-delete-policy

As known, hook resources are not managed by helm directly. In case
"helm upgrade" is run against a minio release - it would fail with an
error: "Error: pods "<release-name>-minio-create-bucket" already
exists". Also, "helm delete" command would not delete the hook pod.

So, to make this more convenient, this commit adds a "hook-delete-policy"
annotation to the hook to automatically delete hook resources on success.

References:
- https://github.com/kubernetes/helm/blob/master/docs/charts_hooks.md#hook-resources-are-not-managed-with-corresponding-releases
- helm/helm#2692

* Bump chart version
  • Loading branch information
janeknowsbest77 authored and unguiculus committed Nov 17, 2017
1 parent b6df979 commit 440d51f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/minio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Distributed object storage server built for cloud applications and devops.
name: minio
version: 0.3.2
version: 0.4.0
keywords:
- storage
- object-storage
Expand Down
1 change: 1 addition & 0 deletions stable/minio/templates/post-install-create-bucket-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
heritage: "{{ .Release.Service }}"
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-delete-policy": hook-succeeded
spec:
restartPolicy: OnFailure
containers:
Expand Down

0 comments on commit 440d51f

Please sign in to comment.