https://pulumi.com logo
#kubernetes
Title
# kubernetes
a

able-crayon-21563

02/12/2020, 5:25 PM
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

gorgeous-egg-16927

02/12/2020, 5:58 PM
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

able-crayon-21563

02/12/2020, 5:59 PM
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

able-crayon-21563

02/12/2020, 6:04 PM
To make your example fit, the guestbook would be wrapped in a ComponentResouce.
g

gorgeous-egg-16927

02/12/2020, 6:10 PM
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

able-crayon-21563

02/12/2020, 6:16 PM
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

gorgeous-egg-16927

02/12/2020, 6:17 PM
Sounds good, thanks
5 Views