Hello, I’m having a problem where K8s resources ar...
# kubernetes
a
Hello, I’m having a problem where K8s resources are being needlessly replaced during an update. Pulumi 0.10.1. Ideas? The output suggests that the
k8s.Provider
that I supply to those resources is being flagged as changing. For example:
Copy code
├─ kubernetes:core:Namespace           foobar        replace     [diff: ~provider]
Seems the provider urn is changing:
Copy code
[provider: urn:pulumi:proto::example::pulumi:providers:kubernetes::cluster-proto::35fb4c9f-c17e-4685-9459-ad432be24927 => urn:pulumi:proto::example::pulumi:providers:kubernetes::cluster-proto::f0e50e3c-7584-479a-bf2f-484379ca4f24]
To be clear, the program flow is to create a GKE cluster, synthesize a kubeconfig, create a
Provider
based on it, and then create a
Namespace
with
{provider: ...}
.
g
Are the resources actually being replaced, or is this only during the preview?
a
It crashes actually, with an integrity error:
Copy code
error: pre-step event returned an error: failed to verify snapshot: resource urn:pulumi:proto::example::main:psp:RestrictivePolicy$kubernetes:policy/v1beta1:PodSecurityPolicy::sn.restrictive refers to unknown provider urn:pulumi:proto::example::pulumi:providers:kubernetes::cluster-proto::35fb4c9f-c17e-4685-9459-ad432be24927
Seems to reduce to, how do I stabilize the provider urn?
g
That’s very odd; I haven’t seen that error before. Could you please open an issue on the pulumi-kubernetes repo with details about the program you’re running?
a
Yes thanks
The issue appears to be resolved. Not 100% sure about the fix but I added a
-gke
suffix to the provider name (to be more similar to an official example).
👍 1