chilly-plastic-75584
03/11/2022, 11:45 PM---
clusters:
- name: cluster1
kubeconfig:
secure: .....
- name: cluster2
kubeconfig:
secure: .....
Now I just added in main a new config object and wrapped the entire deployment setup I had in a for each. Boom. Loop over clusters and go. Due to pulumi's routinues and all the magic going on I figured I'd do a dumb old loop instead of trying concurrent deployments, but looking for a sanity check.
pulumi.Run(func(ctx *pulumi.Context) error {
for _, cluster := range clusterList {
cfgMap, err := configmap.ConfigMap(
ctx,
renderProvider,
&configData,
&appConfig,
&sharedConfig,
)
err = ingress.NetworkingIngress(ctx, renderProvider, &configData, &sharedConfig)
err = service.Service(ctx, renderProvider, &configData, &sharedConfig)
// etc....
_ = <http://ctx.Log.Info|ctx.Log.Info>(fmt.Sprintf("finished processing cluster: %s", cluster.Name), &pulumi.LogArgs{})
}
})
Make sense to do the same deployment this way on 2 clusters without concurrency or any other way you'd say is better? Multiple pulumi.Run or anything else you'd recommend?
I love my experience overall, but it's a lot more complex initially than plain yaml, so I'm double check my approach here makes sense and is reasonable. Much appreciated!quiet-wolf-18467
chilly-plastic-75584
03/13/2022, 7:34 PM