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

ingress-nginx addon: addon not waiting for nginx to be fully deployed #1050

Open
idchrisamzn opened this issue Jul 29, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@idchrisamzn
Copy link

idchrisamzn commented Jul 29, 2024

Describe the bug

We’re using the ingress-nginx addon to setup ingress. However after this some of our addons create ingress objects which rely on the ingress-nginx addon being there. When deploying we get errors similar to:

failed: Error: The stack named chris failed to deploy: CREATE_FAILED (The following resource(s) failed to create: [ciliumaddon]. ): Received response status [FAILED] from custom resource. Message returned: Error: b'Release "cilium" does not exist. Installing it now.\nError: 1 error occurred:\n\t* Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook: Post "[https://nginx-ingress-controller-ingress-nginx-controller-admission.kube-system.svc:443/networking/v1/ingresses?timeout=30s](https://nginx-ingress-controller-ingress-nginx-controller-admission.kube-system.svc/networking/v1/ingresses?timeout=30s)": no endpoints available for service "nginx-ingress-controller-ingress-nginx-controller-admission"\n\n\n'

I’ve tried a few things:
Ordering so that the ingress-nginx addon is defined before the addons with ingress
Annotated the deployment inside those ingress-using addons with:

@blueprints.utils.dependable(blueprints.IngressNginxAddOn.name)

It looks like blueprints just isn’t waiting for the nginx pod to be running before moving on the subsequent addons. With our own custom addons we use the “wait” parameter from helm-addon:

However this doesn’t seem to be available in IngressNginxAddOnProps. Do you have any suggestions of how to resolve this?

Expected Behavior

Subsequent addons with ingress objects deploy without error

Current Behavior

failed: Error: The stack named chris failed to deploy: CREATE_FAILED (The following resource(s) failed to create: [ciliumaddon]. ): Received response status [FAILED] from custom resource. Message returned: Error: b'Release "cilium" does not exist. Installing it now.\nError: 1 error occurred:\n\t* Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook: Post "[https://nginx-ingress-controller-ingress-nginx-controller-admission.kube-system.svc:443/networking/v1/ingresses?timeout=30s](https://nginx-ingress-controller-ingress-nginx-controller-admission.kube-system.svc/networking/v1/ingresses?timeout=30s)": no endpoints available for service "nginx-ingress-controller-ingress-nginx-controller-admission"\n\n\n'

Reproduction Steps

Deploy ingress-nginx addon, and another addon with an ingress at the same time

Possible Solution

Add the "wait" condition to the ingress-nginx addon

Additional Information/Context

No response

CDK CLI Version

2.132.0 (build 9a51c89)

EKS Blueprints Version

1.15.1

Node.js Version

v20.15.1

Environment details (OS name and version, etc.)

Ubuntu 22.04.4 LTS

Other information

No response

@idchrisamzn idchrisamzn added the bug Something isn't working label Jul 29, 2024
@shapirov103 shapirov103 self-assigned this Jul 29, 2024
@shapirov103
Copy link
Collaborator

Implement refactoring all hem addons to support the wait option as the one-off solution won't solve similar cases for the rest of the addons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants