nice-secretary-23177
06/17/2022, 12:42 PMkubernetes.yaml
(ie @pulumi/kubernetes
) module wasn’t working because things weren’t propagating opts.provider
. So I made a workaround that uses local.Command
and setting args.environment.KUBECONFIG
, but now that stopped working too for some reason. It seems to ignore the environment variable (and it tries to use the default kubeconfig file, but luckily I’ve added some guardrails to avoid disasters in case such a bug pops up).
I remember seeing that the propagation bug was fixed. So, I tried to convert to use the builtin yaml methods again, but it looks like nothing in the kubernetes.yaml
module works now, because it complains that map
can’t be called on undefined in yaml/yaml.ts:2993. These are multi-document yaml files (cert manager and aws lb controller), if it matters?quiet-wolf-18467
06/17/2022, 1:36 PMnice-secretary-23177
06/17/2022, 2:00 PMquiet-wolf-18467
06/17/2022, 5:56 PMnice-secretary-23177
06/17/2022, 5:56 PMquiet-wolf-18467
06/17/2022, 5:58 PMnew k8s.yaml.ConfigFile(
"cert-manager",
{
file: "k8s/cert-manager.yaml",
},
{ provider: this.cluster.provider }
);
this.cluster.provider
const provider = new k8s.Provider("eks", { kubeconfig: this.cluster.kubeconfig });
nice-secretary-23177
06/20/2022, 11:01 AMk8s.Provider
but then I saw cluster.provider
and thought “oh how convenient, I’ll use that” 🤦♂️quiet-wolf-18467
06/20/2022, 11:02 AMcluster.provider
is the AWS provider used to spin up the cluster 🙂nice-secretary-23177
06/20/2022, 11:02 AMeks.Cluster.provider
class led me to attempt to use it. It’s also typed as k8s.Provider
, which is probably why TypeScript didn’t complain
/**
* A Kubernetes resource provider that can be used to deploy into this cluster. For example, the code below will
* create a new Pod in the EKS cluster.
*
* let eks = new Cluster("eks");
* let pod = new kubernetes.core.v1.Pod("pod", { ... }, { provider: eks.provider });
*
*/
k8s.rbac.v1.RoleBinding
that use it in repro repo) worked when using this.cluster.provider
kube2pulumi
doesn’t either; it gave me a hint to use the crd2pulumi
tool instead)So I made a workaround that uses😂 I was refactoring/renaming a few things, and there was a typo that slipped through because of anand settinglocal.Command
, but now that stopped working too for some reason. It seems to ignore the environment variable (and it tries to use the default kubeconfig file, but luckily I’ve added some guardrails to avoid disasters in case such a bug pops up).args.environment.KUBECONFIG
any
quiet-wolf-18467
06/21/2022, 10:06 AM.provider
was supposed to be a Kubernetes providernice-secretary-23177
06/21/2022, 10:07 AM