Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue provisioning AzureMachinePool with a UserAssigned managed identity #5265

Open
junkiebev opened this issue Nov 12, 2024 · 1 comment
Open
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@junkiebev
Copy link

/kind bug

Using the AzureMachinePool defined below, I'm getting a message from Azure which would see to indicate that the REST payload being delivered contains comma-separated enum values instead of the field value on the identity parameter

What steps did you take and what happened:

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureMachinePool
metadata:
  name: mc-capi-test-mp-0
  namespace: default
spec:
  location: eastus2
  identity: UserAssigned
  orchestrationMode: Flexible
  userAssignedIdentities:
    - providerID: /subscriptions/104173aa-REDACTED/resourceGroups/rg-mc-capi-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mi-mc-capi-test
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 1
      deletePolicy: Oldest
  template:
    osDisk:
      diskSizeGB: 128
      osType: Linux
    sshPublicKey: REDACTED
    vmSize: Standard_B2ms
$ clusterctl describe cluster mc-capi-test 
NAME                                                             READY  SEVERITY  REASON  SINCE  MESSAGE                                                                                                  
Cluster/mc-capi-test                                             True                     31m                                                                                                              
├─ClusterInfrastructure - AzureCluster/mc-capi-test              True                     33m                                                                                                              
├─ControlPlane - KubeadmControlPlane/mc-capi-test-control-plane  True                     31m                                                                                                              
│ └─Machine/mc-capi-test-control-plane-rkn54                     True                     31m                                                                                                              
└─Workers                                                                                                                                                                                                  
  ├─MachineDeployment/mc-capi-test-md-0                          True                     27m                                                                                                              
  │ └─3 Machines...                                              True                     29m    See mc-capi-test-md-0-bt4fw-7f2h5, mc-capi-test-md-0-bt4fw-bmnqz, ...                                     
  └─MachinePool/mc-capi-test-mp-0                                False  Error     Failed  29m    scalesets failed to create or update. err: failed to create or update resource rg-mc-capi-test/mc-ca ... 
k describe azuremachinepool mc-capi-test-mp-0
...

Status:
  Conditions:
    Last Transition Time:  2024-11-12T20:28:59Z
    Message:               scalesets failed to create or update. err: failed to create or update resource rg-mc-capi-test/mc-capi-test-mp-0 (service: scalesets): PUT https://management.azure.com/subscriptions/REDACTED/resourceGroups/rg-mc-capi-test/providers/Microsoft.Compute/virtualMachineScaleSets/mc-capi-test-mp-0
--------------------------------------------------------------------------------
RESPONSE 400: 400 Bad Request
ERROR CODE: InvalidParameter
--------------------------------------------------------------------------------
{
  "error": {
    "code": "InvalidParameter",
    "message": "The value 'SystemAssigned, UserAssigned' of parameter 'identity' is not allowed. Allowed values are: UserAssigned, None.",
    "target": "identity"
  }
}
--------------------------------------------------------------------------------

What did you expect to happen:

VMSS correctly provisioned and added to the cluster

Environment:

  • cluster-api-provider-azure version: v1.8.4
  • Kubernetes version: (use kubectl version):
    • Client Version: v1.30.3
    • Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    • Server Version: v1.31.0
  • OS (e.g. from /etc/os-release): Ubuntu 22.04.5 LTS
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 12, 2024
@willie-yao
Copy link
Contributor

willie-yao commented Nov 12, 2024

Looking into reproducing this now... what do you see for the identity field when you do kubectl describe machinepools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: Todo
Development

No branches or pull requests

3 participants