I'm getting some behaviour that's indicating that ...
# kubernetes
l
I'm getting some behaviour that's indicating that
v4.Chart
does not inherit providers defined by the opts of a parent ComponentResource. I'm guessing this is because
v4.Chart
is in itself a ComponentResource. Does that mean we need to use
pulumi.mergeOptions
? It's pretty unexpected behaviour so I'm unsure if it's intended
Actually, this seems to be the behaviour of all ComponentResource-based resources in the kubernetes provider, eg yaml.v2.ConfigFile. They aren't inheriting providers from parent ComponentResources 😰 oh jesus I'm going to have to start rolling back states, I've deployed a bunch of stuff to the wrong cluster
Removing a
transforms
in one of the parent ComponentResources to inject tags seems to fix the provider inheritence. This is bizarre, having a
transforms
breaks providers for only ComponentResource based pulumi/kubernetes resources? This makes zero sense. That transform doesn't even touch opts
It looks like running the
helm.v4.Chart
resource through a
transforms
that's defined on a parent ComponentResource causes it to lose references to the parent and its providers. This screenshot is rather messy, but shows: • The
helm.v4.Chart
being defined with a
parent
opt set (
this
refers to the ComponentResource that the chart lives in, which has a
transforms
to add tags and defines providers in a
providers
array passed as an opt) • The breakpoint has hit in the parent ComponentResource
transform
function, showing that the chart resource has no
parent
or
providers
in its
opts
As part of debugging this I disabled default providers, so if I continue from the breakpoint, it errors out because it tries to instantiate a default kube provider.
If I break on the chart resource itself, you can see the opts of the parent
ComponentResource
and its set providers