pulumi / pulumi-kubernetes

A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters
https://www.pulumi.com/docs/reference/clouds/kubernetes/
Apache License 2.0
407 stars 117 forks source link

How to install EXACTLY ONCE for some selected resources for example: aws alb, ingress controller, EFS driver and Storage class #2338

Closed gencube closed 1 year ago

gencube commented 1 year ago

What happened?

image image

Expected Behavior

Since aws alb, ingress controller, EFS driver and Storage class are suppose to be created exactly once, there should be away to properly check their existance in the k8s/EKS environments without causing any error.

Run pulumi up --yes multiple times without causing any error.

Should be able to run multiple time without any error.

Steps to reproduce

just run pulumi up --yes multiple times.

image image image image image

Output of pulumi about

image image image

Additional context

Please send give an email for me to disclose the full source code to reproduce the error.

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

squaremo commented 1 year ago

The model for Pulumi programs is that you declare the resources you want to exist, and pulumi makes sure they exist and match your specifications. You don't usually need to have code in your program for figuring out whether a resource already exists, and doing something different, because pulumi figures that out for you. (For a more precise explanation, see https://www.pulumi.com/docs/intro/concepts/).

Have I misunderstood what you're trying to do?

gencube commented 1 year ago

You don't usually need to have code in your program for figuring out whether a resource already exists, and doing something > different, because pulumi figures that out for you. Yes. you misunderstood. That does not work. I had sent you the code to prove it. The conditional code are added because it does not work. You only need to comment out the conditional code to know the single installation does not work for these resources. You need to run this 3 times to see what I meant. Look at the comment in index.ts It is a bug or no such feature existing for Single installation instants.

gencube commented 1 year ago

@squaremo Have you received the email with the same code attachment to troubleshoot? The index.ts shows the correct sequences and repeat the issue.

Feel free to ask some question to clarify.

squaremo commented 1 year ago

Have you received the email with the same code attachment to troubleshoot

Yes, thank you. I'm not able to look into it right away, though, I'm sorry about that. I've added this issue to our project board so that it won't get forgotten.

gencube commented 1 year ago

Hi, Could you kindly give me an estimate when it can be resolved?

gencube commented 1 year ago

Hi, Kindly give some idea of the status? @squaremo

gencube commented 1 year ago

@danielrbradley, could you please help on this matter? I did not get any response from thread for over 2 weeks.

danielrbradley commented 1 year ago

Hi @gencube you might have more success asking these kinds questions in the community slack. It's not clear from an an intial read of the issue if something's misbehaving in the provider of within your program. Please can you provide a minimal program that reproduces the issue you're experiencing?