Hi,
I used crd2pulumi to generate a Go SDK for Kubernetes gateway API and I’m using Pulumi Kubernetes v4 package to deploy resources using this generated SDK. Notably, I’m using the Gatway and GatewayPatch resources.
However, when using GatwayPatch resources to add listeners to a Gateway resource, Pulumi shows an invalid diff. The listeners field is an array (
https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.Gateway), but the CRD specifies that the merging should treat it as a map with the name as the key. Pulumi diff seems not to behave like this and shows that instead of adding a listener to the gateway, it would modify the existing first listener. But the end result is the expected one, the listener end up being added to the gateway.
I tried to replicate my Pulumi code using kubectl: I create a gateway and then used
kubectl diff --server-side=true
with my gateway patch and it correctly shows that the listener will be added to the gateway.
Do you have an idea why Pulumi behaves differently than kubectl server-side? Is it a known issue?