Skip to content

Unable to change flavor in CloudscaleMachineTemplate for a running cluster #69

Description

@nickspizzas

Description
Changing a topology variable that patches a CloudscaleMachineTemplate field (e.g. cloudscaleWorkerMachineFlavor) breaks CAPI reconciliation on ClusterClass-based clusters.

Error
error reconciling the Cluster topology: failed to reconcile MachineDeployment dev/dev-01-md-0-xxxxx: failed to create patch helper for CloudscaleMachineTemplate dev/dev-01-md-0-xxxxx: server side apply dry-run failed for modified object: admission webhook "vcloudscalemachinetemplate-v1beta2.kb.io" denied the request: CloudscaleMachineTemplate.infrastructure.cluster.x-k8s.io "dev-01-md-0-xxxxx" is invalid: spec.template.spec: Forbidden: field is immutable

Environment

  • CAPCS version: v1.0.1
  • CAPI version: v1.13.4
  • Kubernetes version: v1.35.6

Steps to reproduce

  1. Create a cluster.
  2. After the cluster is fully provisioned, change the variable value in Cluster.spec.topology.variables (e.g. change flavor from flex-8-4 to flex-16-8) and apply.
  3. Observe the CAPI controller log — it immediately enters a retry loop with the error above.
    No new CloudscaleMachineTemplate is created; no MachineDeployment rollout is triggered.

Expected behavior
CAPI creates a new CloudscaleMachineTemplate, updates the MachineDeployment reference, and triggers a rolling node replacement automatically.

Actual behavior
Cluster is not being reconciled and no new nodes are provisioned.

Notes
You mentioned some limitations here: https://github.com/cloudscale-ch/cluster-api-provider-cloudscale/blob/main/docs/troubleshooting.md#webhook-validation-common-rejections

Should this also apply to CloudscaleMachineTemplate? And if yes, how can I change the Flavor of a running Cluster?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions