rancher / aks-operator

Azure Kubernetes Service operator for Rancher
Apache License 2.0
9 stars 30 forks source link

API does not throw error when Availability Zone of a nodepool is updated #669

Open valaparthvi opened 2 weeks ago

valaparthvi commented 2 weeks ago

Ideally, it is not possible to update the Availability Zone of a cluster nodepool once it has been created, Rancher Dashboard does not allow it, but updating this via API does not raise any error. It simply reverts the changes to AKSConfig after a few minutes.

The API should raise an error when the user tries to update NodePool Availability Zone.

Steps to reproduce:

  1. Create a cluster and note the AZ of nodepools.
  2. Update the cluster nodepool AZ via API.
  3. Check AKSConfig, the AZ must have been updated.
  4. Check Azure Cloud Console, the AZ must stay intact.
  5. Wait for a few minutes until AKSConfig is restored to its original state.

Expected results: The API must throw an error saying that updating the Availability Zone is not allowed.

Rancher version: v2.9-5fcd75d6ef3870052ec4b3e8ab0b77fb680473ac-head AKS Operator version: rancher/aks-operator:v1.9.2

PR's:

valaparthvi commented 2 days ago

I tested this with rancher-aks-operator:104.3.0+up1.9.3-rc.1, and it only seems to log that the availability zone cannot be updated in the logs; the API throws no error. Is it possible to add that validation, @mjura?