sparse-intern-71089
09/14/2021, 8:49 PMbrave-ambulance-98491
09/14/2021, 8:52 PMProvider
instance in as the provider
to all of the Kubernetes objects you're creating?able-doctor-68496
09/14/2021, 8:54 PMechoing-motherboard-16358
09/14/2021, 8:58 PMKUBECONFIG
env var and watched for which resources fail.able-doctor-68496
09/14/2021, 9:04 PM__init__
of my `ComponentResource`:
provider = pulumi_kubernetes.Provider('kubernetes-provider', kubeconfig=args.kubeconfig)
self._opts = opts.merge(pulumi.ResourceOptions(provider=provider)).merge(pulumi.ResourceOptions(parent=self))
And this is the code that is creating the object that is failing:
self._configmap_license = pulumi_kubernetes.core.v1.ConfigMap(
f'{self._name}-license',
metadata=meta_v1.ObjectMetaArgs(
name=f'{self._name}-license',
namespace=self._args.namespace_name
),
data={
'seeq_server_license': license_file.read()
},
opts=self._opts
)
brave-ambulance-98491
09/14/2021, 9:10 PMmerge
is retaining a bad provider somehow? It looks like providers can be a list or collection, and merge
is documented as retaining all items in all collections.brave-ambulance-98491
09/14/2021, 9:10 PMprovider
directly in the resource options constructor, and have never used merge
.able-doctor-68496
09/14/2021, 9:12 PMable-doctor-68496
09/14/2021, 9:15 PMopts
passed into the parent component and self._opts
is supposed to be passed into the child components - so that was wrong - and I wasn’t passing the parent component’s opts
to super().__init__
able-doctor-68496
09/14/2021, 9:17 PMResourceOptions
fixed it! Thanks for the help, @brave-ambulance-98491brave-ambulance-98491
09/14/2021, 9:22 PM