is there a way to deploy to k8s and generate the yaml to a directory at the same time? currently you need to create a separate k8s provider and set the renderYamlToDirectory property as setting this property causes the other attributes like kubeconfig to be ignored. i could create two k8s objects with different providers, since you can only pass one provider, but it would be nice if you could pass multiple providers to k8s objects.
or even better to have a renderYamlToDirectory (or a similar name to not break existing programs) property that can be used together with the kubeconfig property in the same provider to deploy and render yaml at the same time.
so this solution will allow you to use pulumi kubernetes provider to deploy to k8s and also render the yaml at the same time?
i'm not that familiar with typescript but does the spread operator and object.assign() method actually instantiate a pulumi resource so the provider executes?
@chilly-plastic-75584 thanks for that link. were you able to verify that the suggestion works?
03/22/2022, 6:31 PM
No, I did not try a multiplexer. I just added a config "onlyyaml" to my stack and made a yaml renderer stack. I was thinking of trying to just pass a flag (haven't checked if can pass custom flags yet, but was assuming it's possible) . Then I'd just set internally.
03/22/2022, 8:51 PM
I would prefer not to use another stack. I tried the multiplexer example and while it creates a resource that uses the second provider it doesnt seem to be able to do both at the same time. I think you need to instantiate the class for both providers to execute. I'll create a feature request in GitHub