TykTechnologies / tyk-helm-chart

A Helm chart repository to install Tyk Pro (with Dashboard), Tyk Hybrid or Tyk Headless chart.
https://tyk.io
71 stars 55 forks source link

[TT-5609] The post-install job needs to be deleted with helm uninstall of tyk-pro #152

Closed letzya closed 2 years ago

letzya commented 3 years ago

If my install failed and I do helm uninstall tyk-pro, i still cant install since I get:

Error: failed post-install: warning: Hook post-install tyk-pro/templates/bootstrap-post-install.yaml failed: jobs.batch "bootstrap-post-install-tyk-pro" already exists

The post-install job needs to be deleted as well.

Currently it's causing a lot of pain.

letzya commented 2 years ago
  1. bootstrap post job doesn't get deleted
  2. k8s operator secret should be deleted
  3. we should handle all the cases that cause it to fail
  4. We need to find a clean way to delete the whole installation. add a script if we have to.
  5. bootstrap should check if license exists and return an error

Zaid - can we use the cli command tyk-analytics bootstrap?

rewsmith commented 2 years ago

@letzya To simply delete the batch job, modifying the bootstrap-post-install.yaml template to include "helm.sh/hook-delete-policy": hook-succeeded,hook-failed will delete the batch job if the bootstrap fails, for example if the license is invalid. As you say though, we probably need a more complete solution and think about how we handle the collection/tables already existing in mongo/postgres

letzya commented 2 years ago

@buraksekili

buraksekili commented 2 years ago

@rewsmith thank you! we have a couple of open PRs (#202 and #203 ) regarding bootstrap jobs. I'm hoping that we'll be able to fix the fundamental issues with bootstrap jobs soon, such as those that arise when there is a preceding job.

buraksekili commented 2 years ago

Resolved via #202