pulumi-eks
pulumi-eks copied to clipboard
Stringify the kubeconfig generated instead of returning an Output<t>
Problem description
The default kubeconfig file is returned as a type of Output<any>. To use this in providers, users have to take the additional step of stringifying the object. Instead, the default should be a string.
https://github.com/pulumi/pulumi-eks/blob/5789272ff788ce910671469245578269ec57517e/nodejs/eks/cluster.ts#L394-L412
Suggestions for a fix
Stringify the kubeconfig before setting it in the cluster, assuming this change does not break existing clusters.
However, if a consumer of a kubeconfig is already stringifying it themselves, this could lead to issues.
We could also fix this on the k8s provider side and try to stringify the kubeconfig there before failing.
@lblackstone Agreed on supporting this in the k8s provider per https://github.com/pulumi/pulumi-kubernetes/issues/1032, instead of in p/eks as changing the shape of the kubeconfig output may affect existing clusters and stack references.
Actually support string | object here, and JSON-stringify an object input. I'm not exactly sure what this looks like in a purely cross-platform compatible form, and it's likely something we want to solve for as a general schema model concept.
Keeping this issue around to track p/k8s 1032
This was fixed in https://github.com/pulumi/pulumi-eks/issues/462 by adding a kubeconfigJson output property (see https://github.com/pulumi/pulumi-eks/pull/815/commits/f20a0b62670fad1279c3cc5dcd0b84f78d05030d).
Cannot close issue:
- does not have required labels:
resolution/
Please fix these problems and try again.
Cannot close issue:
- does not have an assignee
Please fix these problems and try again.