I've just found something very weird. The resource...
# kubernetes
g
I've just found something very weird. The resources created by the
helm.v4.Chart
are not inheriting the Kubernetes Provider from the
Chart
resource itself. The deployment was failing with an error about credentials being expired, which I eventually realized is because it was using my local kubectl credentials that requires a separate command to refresh (intentionally), so it worked while I was monitoring the cluster on a separate terminal but not when I was monitoring from the web UI and not logged in to kubectl. I disabled the default provider to confirm this theory and the error became this:
Copy code
kubernetes:core/v1:Service (us-central1-kafka-cluster:streams/main-cluster-8c46331c-kafka):
    error: Default provider for 'kubernetes' disabled. 'urn:pulumi:croct::garden::croct/regionResources$croct/resourceBag$kubernetes:helm.sh/v4:Chart$kubernetes:core/v1:Service::us-central1-kafka-cluster:streams/main-cluster-8c46331c' must use an explicit provider.
The provider is set explicit on the
Chart
resource and it is one of the
resources
in a parent
ComponentResource
(the
croct/resourceBag
in the URN above). I'll open an issue on the repo for this, but does anyone have an idea for how to workaround this problem? There will be multiple clusters in the same stack, so it really can't use just the default provider.
Figured out a workaround:
Copy code
provider: provider,
			providers: [provider],
			transforms: [
				({ props, opts }) => ({
					props,
					opts: pulumi.mergeOptions(opts, { provider: provider }),
				}),
			],
Tracking issue if anyone is interested: https://github.com/pulumi/pulumi-kubernetes/issues/3684