OpenStackMachineTemplate spec.template.spec field is immutable.
Created by: garloff
Not having changed clusterctl.yaml, re-running create_cluster.sh under certain circumstances results in this error.
OpenStackMachineTemplate spec.template.spec field is immutable. Please create a new resource instead. Ref doc: https://cluster-api.sigs.k8s.io/tasks/change-machine-template.html
Need to determine under what circumstances and why this happens and avoid it.
Error from server (Invalid): error when applying patch: {"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"infrastructure.cluster.x-k8s.io/v1alpha4\",\"kind\":\"OpenStackMachineTemplate\",\"metadata\":{\"annotations\":{},\"name\":\"k8s-clusterapi-testcluster-md-0-genw1\",\"namespace\":\"default\"},\"spec\":{\"template\":{\"spec\":{\"cloudName\":\"gx-hack-1\",\"flavor\":\"SCS-2V:4:20\",\"identityRef\":{\"kind\":\"Secret\",\"name\":\"testcluster-cloud-config\"},\"image\":\"ubuntu-capi-image-v1.22.7\",\"securityGroups\":[{\"name\":\"allow-ssh\"},{\"name\":\"allow-icmp\"}],\"serverGroupID\":\"fbbd8150-29eb-46c6-baf7-62edcd96c3f8\",\"sshKeyName\":\"capi1-keypair\"}}}}\n"}},"spec":{"template":{"spec":{"serverGroupID":"fbbd8150-29eb-46c6-baf7-62edcd96c3f8"}}}}
None of this should have changed ...