sparse-intern-71089
06/10/2022, 4:45 AMlittle-cartoon-10569
06/10/2022, 4:49 AMInput<string>
can take `Output<string>`s. Is it not working if you just the kubeconfig directly?brief-vr-24049
06/10/2022, 4:50 AMTypeError: Cannot read property 'map' of undefined
when I try to use the providerlittle-cartoon-10569
06/10/2022, 4:50 AMbrief-vr-24049
06/10/2022, 4:51 AMnew k8s.yaml.ConfigFile("k8s-kubernetes-dashboard-yaml", { file: `${__dirname}/yaml/kubernetes-dashboard.yaml` }, { provider });
brief-vr-24049
06/10/2022, 4:52 AMstring
rather than an Output<string>
, even though it looks like an Output<string>
should be accepted?little-cartoon-10569
06/10/2022, 4:53 AMlittle-cartoon-10569
06/10/2022, 4:54 AMbrief-vr-24049
06/10/2022, 4:54 AMexport const provider = new k8s.Provider("production", {
cluster: productionCluster.clusterName,
kubeconfig,
});
brief-vr-24049
06/10/2022, 4:55 AMproductionCluster.clusterName
and kubeconfig
are of type Output<string>
, but the cluster
doesn't seem to be the issuebrief-vr-24049
06/10/2022, 4:55 AMkubeconfig
that causes itlittle-cartoon-10569
06/10/2022, 4:55 AMbrief-vr-24049
06/10/2022, 4:56 AMnode_modules\@pulumi\yaml\yaml.ts:2993:14
is referring to? There doesn't seem to be a file in node_modules by that name, so I can't look at that codebrief-vr-24049
06/10/2022, 4:56 AMThe contents of a kubeconfig file or the path to a kubeconfig file.
brief-vr-24049
06/10/2022, 4:57 AMbrief-vr-24049
06/10/2022, 4:57 AMbrief-vr-24049
06/10/2022, 4:58 AMlittle-cartoon-10569
06/10/2022, 5:10 AMbrief-vr-24049
06/10/2022, 5:14 AMbrief-vr-24049
06/10/2022, 5:14 AMlittle-cartoon-10569
06/10/2022, 5:29 AMbrief-vr-24049
06/10/2022, 5:32 AMhappy-raincoat-89168
06/23/2022, 8:06 PM{ provider: cluster.provider }
should make it work, but I’m getting the 'map' of undefined
error too.brief-vr-24049
06/23/2022, 8:07 PMhappy-raincoat-89168
06/23/2022, 8:08 PMConfigFIle
line and do pulumi up
, the cluster comes up successfully. Then if I include the ConfigFile
line again, that manifest successfully deploys. They just don’t like to deploy from 0 to both cluster and manifest deployed on the same pulumi up
. Do you see the same behavior?brief-vr-24049
06/23/2022, 8:09 PMhappy-raincoat-89168
06/23/2022, 8:09 PMbrief-vr-24049
06/23/2022, 8:10 PMPromise<k8s.Provider>
that read the private field isKnown
off of the output. And then where I wanted to use the Provider, I did it with a .then
.billowy-army-68599
brief-vr-24049
06/23/2022, 8:10 PMconst provider = new Promise<k8s.Provider>(res => {
(kubeconfig as unknown as { isKnown: Promise<boolean> }).isKnown.then(known => {
if (known) {
res(kubeProvider);
}
console.log("Kubeconfig is not known, so skipping kubernetes resource preview may be inaccurate!.");
// We don't call rej here because this is not an error we want to fail on. Instead, things waiting for this provider will hang and not be created.
});
});
brief-vr-24049
06/23/2022, 8:11 PMprovider.then(provider => {
new k8s.core.v1.Namespace("some-namespace", { provider });
});
billowy-army-68599
brief-vr-24049
06/23/2022, 8:11 PMhappy-raincoat-89168
06/23/2022, 8:11 PMbrief-vr-24049
06/23/2022, 8:12 PMbrief-vr-24049
06/23/2022, 8:12 PMhappy-raincoat-89168
06/23/2022, 8:14 PMhappy-raincoat-89168
06/23/2022, 8:15 PMconst namespace = new k8s.core.v1.Namespace(`${ns}-ns`,
{
metadata: {
name: ns,
labels: {
'<http://app.kubernetes.io/name|app.kubernetes.io/name>': 'aws-load-balancer-controller',
}
}
},
{
provider: cluster.provider,
parent: cluster.provider
});
brief-vr-24049
06/23/2022, 8:15 PMhappy-raincoat-89168
06/23/2022, 8:16 PMbrief-vr-24049
06/23/2022, 8:16 PMk8s.yaml.ConfigFile
that was initially causing me issues.happy-raincoat-89168
06/23/2022, 8:16 PMbrief-vr-24049
06/23/2022, 8:16 PMhappy-raincoat-89168
06/23/2022, 8:17 PMhappy-raincoat-89168
06/23/2022, 8:24 PMkubeProvider
come from in your workaround?brief-vr-24049
06/23/2022, 8:24 PMbrief-vr-24049
06/23/2022, 8:25 PMconst kubeProvider = new k8s.Provider("production", {
cluster: productionKubernetes.clusterName,
kubeconfig,
});
brief-vr-24049
06/23/2022, 8:25 PMkubeconfig
is an pulumi.Output<string>
brief-vr-24049
06/23/2022, 8:26 PMbrief-vr-24049
06/23/2022, 8:26 PMhappy-raincoat-89168
06/23/2022, 8:45 PM