-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm post-install hooks are not triggered when used by helm_release
and wait = true
#683
Comments
Appreciate this issue being documented. Just saved sometime by switching that wait configuration. |
Spent so much time investigating this and looking into Tiller logs, etc... manual install worked fine, but the hooks never run when deployed from my TF module. |
Hi All, To use resource "helm_release" "airflow" {
repository = "https://airflow-helm.github.io/charts"
chart = "airflow"
name = "airflow"
version = "8.0.9"
namespace = "airflow"
wait = false
} I don't know what causes this bug, but I can tell what happens on the deployment and airflow side I hope it helps.
helm_release installation steps:
Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 8, in <module>
sys.exit(main())
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/commands/db_command.py", line 54, in check_migrations
db.check_migrations(timeout=args.migration_wait_timeout)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/db.py", line 598, in check_migrations
raise TimeoutError(f"There are still unapplied migrations after {ticker} seconds.")
TimeoutError: There are still unapplied migrations after 60 seconds. This is cased by airflow |
face same issue with bitnami/kong too Bitnami Kong also use
and thx @andormarkus workaround solution. |
I faced this issue as well and it took a minute to realize that it was my setting the |
I also was seeing this issue! |
I have the same issue with my own charts. If i remove the hook it works fine. otherwise, helm_release just ignore it. |
Same problem here on my own chart! |
The same problem with 2.8.0 and CloudBees sidecar helm chart:
|
Got to replicate the install of charts that involve post-install hooks and found that with helm CLI that the chart will not install if |
If anyone is coming here from data-on-eks self-managed-airflow, is testing locally, and already has
This allowed me to successfully deploy updates using |
This bug also affects the official Mastodon Helm chart. |
Yeh, unfortunately the only way to avoid this is: resource "helm_release" "release-name" {
wait = false
atomic = false
...
} |
If you still want to use the |
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you! |
Terraform, Provider, Kubernetes and Helm Versions
Helm chart with post-install hooks will nor be installed succsefully with
wait = true
, the provider behavior waits for installation to be READY, some charts won't get to the READY state without the post install step. eventually timeout is reached. Provider then exists *indicating a succsefully installation and will not install the post-install manfists.Try install https://github.com/apache/airflow/tree/master/chart (you can download the directory instead of installing the entire repository).
You'll notice that the https://github.com/apache/airflow/blob/master/chart/templates/migrate-database-job.yaml is not installed by Helm when used by
helm_release
and usewait = true
. Kindly note theannotations."helm.sh/hook": post-install,post-upgrade
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
terraform apply
Expected Behavior
Chart Installed Successfully
Actual Behavior
The chart runs and waits until
timeout
is passed, then it outputs that 1 resource created successfully, but when you check the chart it failed, and checking the Helm release, not all manifests are installed.Important Factoids
None.
Community Note
The text was updated successfully, but these errors were encountered: