Closed chirauki closed 1 year ago
Hi @chirauki -- as far as I can tell from those logs, this might be an issue with Server-Side Apply on your cluster. Since the last-applied-configuration
annotation is present, I assume that you're not using SSA mode for your pulumi-kubernetes
provider?
Assuming not, I suspect that another controller on the cluster may be managing the .spec.service.ports
field. Notice that the managedFields
output doesn't include the ports
, which leads me to believe that it's not being managed by pulumi. You can check the full resource details by running the following command:
(I'm not 100% sure on the resource type. I put gateway
, but that might not be correct)
# kubectl get <kind> <name> -n <namespace> -o json --show-managed-fields
kubectl get gateway tierone-tier1-028d9b1d -n t1-92b9f5e6 -o json --show-managed-fields
NVM, this was a combination of lack of sleep and YAML engineering... We were missing a nested field, which caused the controller to (correctly) interpret the resource as empty, so it was applying the defaults. That's the same reason why updates did not work either.
Sorry to bother you... I will close this one.
Glad you figured it out :)
What happened?
We have some schemas that we obtain from running
crd2pulumi
. For one of them, we are seeing thatspec
is not being updated in the cluster.The interface for the type looks like this:
Steps to reproduce
-
Expected Behavior
spec
is propagated correctly to the destination object in k8s.Actual Behavior
When creating the resource, I can see the
preview --diff
shows the right spec being computed:pulumi up --diff
shows the same diff in the preview, but in the create, I can see:You can see how the
outputs
show the right info in thekubectl.kubernetes.io/last-applied-configuration
annotation, and also includes thefoo
annotation, but the spec is not there. The same happens for create or update, the spec is ignored, but thekubectl.kubernetes.io/last-applied-configuration
annotation is updated accordingly.Output of
pulumi about
No response
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).