-
Notifications
You must be signed in to change notification settings - Fork 117
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
preview fails when upgrading to version 4 even though server side apply is disabled #2521
Comments
Hi @doy-materialize - thank you for reporting this issue. The team will take a look! |
@doy-materialize I'm sorry that you're experiencing this inconvenience. To get more context on this issue, is the CI environment only doing previews and not attempting to actuate/create the resources on cluster? Would you be able to share the RBAC config for the service account used by CI for previews? I'm still investigating things, but will document some things as I keep investigating.
|
So I was able to reproduce this issue, both in v3 and v4. v3 Codepath: pulumi-kubernetes/provider/pkg/provider/provider.go Lines 1780 to 1782 in 3d101a0
As such, the create function returns early here: pulumi-kubernetes/provider/pkg/provider/provider.go Lines 1785 to 1788 in 3d101a0
In v4, the logic check is slightly different:
Here, the default settings will cause the provider to not return early unlike in v3. The provider will proceed further and attempt to create against the live cluster:
There are 2 potential approaches to fixing this, we can drop the error if it's an authentication error when attempting to do a create dry run. This essentially means preview will not show any error, and indicate to the user that they are able to create the resources even if they are unable to. This would be beneficial in this scenario since I assume CI only cares about preview, and not actuation of resources. This means that preview/diff will be against the resources stored in state. Alternatively, we can wrap the error to be more descriptive, and return the error in preview as well, not just when running |
What happened?
when upgrading to pulumi-kubernetes 4.0.3, our previews in ci are now failing with:
even though our provider is passing
enable_server_side_apply=False
and we have also setkubernetes: enableServerSideApply: false
in our stack configuration. i would have also expected #2419 to have fixed this even if we hadn't been setting the configuration ourselves, so i'm not sure what is wrong here.Expected Behavior
pulumi preview
should succeed without requiring create permissionsSteps to reproduce
our provider definition (python) looks like this:
and we have this in our Pulumi.staging.yaml:
i'm not sure what else is relevant here, our pulumi codebase is fairly large
Output of
pulumi about
(this is from running on my local machine - we are seeing this issue in a ci run which just bumps the kubernetes plugin version from 3.30.1 to 4.0.3)
Additional context
No response
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).
The text was updated successfully, but these errors were encountered: