Skip to content
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

rancher-turtles: disable core provider pre-delete hook #158

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

hardys
Copy link
Contributor

@hardys hardys commented Sep 27, 2024

This can fail when install fails prior to installing the Namespace leaving the chart in an uninstallable state

    + helm_v3 uninstall rancher-turtles --namespace rancher-turtles-system --wait
    Error: warning: Hook pre-delete rancher-turtles/templates/core-provider.yaml failed: 1 error occurred:
            * namespaces "capi-system" not found

This can arise when installing via the RKE2 helm controller if cert-manager is not yet ready:

+ helm_v3 install --namespace rancher-turtles-system --create-namespace --version 0.3.1+up0.11.0 rancher-turtles /tmp/rancher-turtles.tgz --values /config/values-01_HelmChart.yaml
Error: INSTALLATION FAILED: 2 errors occurred:
	* Internal error occurred: failed calling webhook "webhook.cert-manager.io": failed to call webhook: Post "https://cert-manager-webhook.cert-manager.svc:443/validate?timeout=30s": no endpoints available for service "cert-manager-webhook"
	* Internal error occurred: failed calling webhook "webhook.cert-manager.io": failed to call webhook: Post "https://cert-manager-webhook.cert-manager.svc:443/validate?timeout=30s": no endpoints available for service "cert-manager-webhook"

In this situation we don't require cleanup, we just need the chart to uninstall cleanly so the helm controller can try again and eventually succeed when cert-manager is ready.

This can fail when install fails prior to installing the Namespace
leaving the chart in an uninstallable state

+ helm_v3 uninstall rancher-turtles --namespace rancher-turtles-system --wait
Error: warning: Hook pre-delete rancher-turtles/templates/core-provider.yaml failed: 1 error occurred:
	* namespaces "capi-system" not found
@hardys
Copy link
Contributor Author

hardys commented Sep 27, 2024

A preview of this is available for testing at https://hardys.github.io/charts/

@fdegir
Copy link

fdegir commented Sep 28, 2024

Initial tests passed and will run additional tests to confirm.

Copy link

@dprodanov4 dprodanov4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Stack Validation and deployment was successful. LGTM!

Copy link

@fdegir fdegir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked in airgapped environment as well!

@hardys hardys merged commit bff92b6 into suse-edge:main Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants