datawire / ambassador-chart

Helm Chart for Installing Ambassador
42 stars 60 forks source link

Added delete policy , before hook creation #155

Closed markrity closed 3 years ago

markrity commented 3 years ago

Added delete policy , before hook creation , to handle cases where th…ere was a previous job that was stuck

Saw this issue on main repo : https://github.com/datawire/ambassador/issues/3047

In issue described that user had issue with helm delete and it got stuck on crddelete job with the following output:

Error: warning: Hook pre-delete ambassador/templates/crd-delete.yaml failed: jobs.batch "ambassador-crd-cleanup" already exists

This hook-delete-policy , can help handle those issues.

markrity commented 3 years ago

@ellisvalentiner Hi, I have seen that someone already did additional work on that hook here: https://github.com/datawire/ambassador-chart/commit/102cab52166bcd46ea63962cfcac89bf93e521f2#diff-0659a1be4413e9a9bd217a3af4afbfc21c2154aaca6f297cc53de6dd27ce6646

But before-hook-creation is still needed, since there might be a case that previous job has failed , and it wont let to perform it again till previous job is deleted. So this one will delete it.

markrity commented 3 years ago

@acookin WDYT?

markrity commented 3 years ago

@nbkrause Hi Noah, do you mind merging it?