Hello again Pulumi people, maybe a silly question ...
# kubernetes
f
Hello again Pulumi people, maybe a silly question but is there a way to perserver the order of arrays/objects for some k8s objects (for example HorizontalPodAutoscaler v2) For example:
Copy code
~ kubernetes:autoscaling/v2:HorizontalPodAutoscaler: (update)
        [id=default/site-hpa]
        [urn=urn:pulumi:[REDACTED]::[REDACTED]::kubernetes:autoscaling/v2:HorizontalPodAutoscaler::[REDACTED]]
        [provider=urn:pulumi:[REDACTED]::[REDACTED]::pulumi:providers:kubernetes::[REDACTED]::0889cfb2-7e6b-4230-bb44-90f2ea23765d]
      ~ spec: {
          ~ metrics: [
              ~ [0]: {
                      ~ resource: {
                          ~ name: "memory" => "cpu"
                        }
                    }
              ~ [1]: {
                      ~ resource: {
                          ~ name: "cpu" => "memory"
                        }
                    }
            ]
        }
It constantly says
update
on
pulumi up
even tho nothing is updated (with or without
PULUMI_K8S_ENABLE_PATCH_FORCE="true"
, without even sometimes it fails)… also sometimes it swaps the order in the metrics array. Also any way to force update regardless? p.s
refresh
does nothing as well
d
The order looks like it's an upstream bug in k8s, but sounds like it's fixed in v1.27.0. https://github.com/kubernetes/kubernetes/issues/74099
You're probably best updating the order in your code
f
Thanks @dry-keyboard-94795, will check it out