is it desirable to include the kind and version in...
# kubernetes
k
is it desirable to include the kind and version in a resource? e.g.
Copy code
const eventRouterServiceAccount = new k8s.core.v1.ServiceAccount(
    "eventRouterServiceAccount",
    {
      apiVersion: "v1", // << Remove?
      kind: "ServiceAccount", // << Remove?
      metadata: {
        name: "eventRouter",
        namespace: "kube-system",
      },
    }
  );
a) we already know we're creating a
ServiceAccount
, b) we're specifying the version twice
core.v1.
This is from kube2pulumi
g
It’s redundant, but it works. It’s a minor (known) bug in
kube2pulumi
https://github.com/pulumi/kube2pulumi/issues/10
You can safely remove those fields since they’re set in the resource constructors
k
thanks, eventually I'll put all the pieces together 🙂