sparse-intern-71089
05/15/2023, 11:38 AMmicroscopic-lock-66960
05/17/2023, 2:17 PMgorgeous-egg-16927
05/24/2023, 1:52 AMmicroscopic-lock-66960
05/25/2023, 4:16 PM-v=9
and tailed the log file with a pipe to grep executing
this was to look to see what functions were executed when we see the traffic, as we have log statements such as this one. I can see we have cycles of Check, Diff, Check Diff. What I found interesting was looking at the timestamps I could see the Diff function executed once every 1-2 seconds with SSA on, but with SSA off it varies, sometimes 60 executions per second. Delving further I see this which is what I expect causes SSA to be slower, which makes sense.
My thinking is to build the Kubernetes provider locally with a change to accept an environment variable that will force client side diff, essentially doing the same as this. If this improves the performance considerably and still leaves the benefits or conflict resolution (not sure if it would as I don’t know the provider code at all well) then that would be good. If that experiment proves successful perhaps it’s possible to change the logic so that it first attempt a client side diff, then only if changes are detected perform a sever side diff. Do let me know if you think I’m barking up the wrong tree here. I will try to experiment as and when I have the time.microscopic-lock-66960
05/25/2023, 4:17 PMgorgeous-egg-16927
05/25/2023, 6:29 PMgorgeous-egg-16927
05/25/2023, 8:44 PMI’ve looked at the events in CloudWatch for EKS while the connection is active, it looks as though Pulumi may be querying all the Kubernetes resources in the state file. If it is doing this, I’m not sure why it would need to do so, as Pulumi has refresh as a separate command. We don’t see similar querying for AWS resources.I bet this is indeed the issue. This behavior differs from our other providers because it’s making a server-side check for every resource instead of diffing against local state. It was implemented like this because it’s pretty common for other controllers to modify resources and cause drift from Pulumi’s state. I’ll do some testing to confirm. 🤔
microscopic-lock-66960
05/26/2023, 8:30 AMtryServerSidePatch
if k.clientSideDiffMode {
return nil, nil, false, nil
}