aws / eks-anywhere

Run Amazon EKS on your own infrastructure 🚀
https://anywhere.eks.amazonaws.com
Apache License 2.0
1.94k stars 277 forks source link

TinkerbellMachineTemplate.Spec is immutable during cluster upgrade #6995

Open ph-armada opened 8 months ago

ph-armada commented 8 months ago

What happened: When upgrading the cluster, EKSA throws error about "TinkerbellMachineTemplate.Spec is immutable"

What you expected to happen: EKSA allows TinkerbellMachineTemplate.Spec in cluster upgrade.

How to reproduce it (as minimally and precisely as possible): Edit the TinkerbellMachineTemplate section, and trigger a cluster upgrade command:

eksctl anywhere upgrade cluster -f ./eksa-mgmt03-workers.yaml --kubeconfig ./mgmt03/mgmt03-eks-a-cluster.kubeconfig --no-timeouts -v 9

Anything else we need to know?: Please refer to the following log:

\nversion: \\\"0.1\\\"\\n\"}}}}\nto:\nResource: \"infrastructure.cluster.x-k8s.io/v1beta1, Resource=tinkerbellmachinetemplates\", GroupVersionKind: \"infrastructure.cluster.x-k8s.io/v1beta1, Kind=TinkerbellMachineTemplate\"\nName: \"mgmt03-worker-01-control-plane-template-1699424535180\", Namespace: \"eksa-system\"\nfor: \"STDIN\": error when patching \"STDIN\": admission webhook \"validation.tinkerbellmachinetemplate.infrastructure.x-k8s.io\" denied the request: TinkerbellMachineTemplate.Spec is immutable\n", "retries": 29}

Environment:

ph-armada commented 7 months ago

Hi team - the tinkerbell machine template needs to stream the new image, so if it's immutable, how can we set the new image? Could you please help instruct? Thanks!

https://anywhere.eks.amazonaws.com/docs/getting-started/baremetal/bare-spec/#ubuntu-tinkerbelltemplateconfig-example


      - environment:
          COMPRESSED: "true"
          DEST_DISK: /dev/sda
          IMG_URL: https://my-file-server/ubuntu-v1.23.7-eks-a-12-amd64.gz
        image: public.ecr.aws/eks-anywhere/tinkerbell/hub/image2disk:6c0f0d437bde2c836d90b000312c8b25fa1b65e1-eks-a-15
        name: stream-image
        timeout: 360
ph-armada commented 7 months ago

Hi team - may I know if there is any insight that you can share? Thanks!

ph-armada commented 7 months ago

Hi @pokearu - just saw a similar discussion so I would like to tag you for your insights on this inquiry. Do you have a tinkerbell config sample for cluster upgrade?

Please feel free to help involve the right topic owner, if needed. Thanks!

https://github.com/aws/eks-anywhere/issues/5316