Hello, I am sorry to report that the “invoke” fix ...
# kubernetes
a
Hello, I am sorry to report that the “invoke” fix in 1.5.3 is regressing the use of
provider
in the
ConfigFile
. It seems to use the ambient kube provider.
I bet that this example would demonstrate the issue: https://github.com/pulumi/kubernetes-guides/blob/91f57c393fd9e5c14c74c7d087e3b08a8d919bae/gcp/03-cluster-configuration/index.ts If one were to add a
ConfigFile
to the mix.
g
Hi Eron, I responded on the issue. I wasn’t able to reproduce this behavior. Can you open an issue with more details on your setup?
a
Can you post your example? then I can compare.
One complication in my program is, I use a
pulumi.ComponentResource
to wrap the
ConfigFile
. i.e.
provider
is set on the
ComponentResource
, and the
ConfigFile
simply uses
parent
. Could that be it?
Yeah, could be specific to ComponentResource
a
To make your example fit, the guestbook would be wrapped in a ComponentResouce.
g
Testing this now:
Copy code
export class TestComponentResource extends pulumi.ComponentResource {
    constructor(name: string,
                opts: pulumi.ComponentResourceOptions = {}) {
        super("test:kubernetes-ts:TestComponentResource", name, {}, opts);

        new k8s.yaml.ConfigFile("guestbook",
            {file: "guestbook.yaml"}, {parent: this}
        );
    }
}

new TestComponentResource("test", {provider: gkeCluster.provider});
That worked for me as well
a
OK, thanks very much for investigating, I’ll try to make a repro based on your script. One error I noticed in mine is that I didn’t have the
parent
set on the provider; I had
dependsOn
.
g
Sounds good, thanks