{"record":{"id":"2a9d9c596da904b6","repo":"kubernetes/kops","slug":"unexpected-instance-group-role-for-instance-group","errorCode":null,"errorMessage":"unexpected instance group role for instance group: %q, %q","messagePattern":"unexpected instance group role for instance group: %q, %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/azuremodel/vmscaleset.go","lineNumber":124,"sourceCode":"\t}\n\tt := &azuretasks.VMScaleSet{\n\t\tName:               new(name),\n\t\tLifecycle:          b.Lifecycle,\n\t\tResourceGroup:      b.LinkToResourceGroup(),\n\t\tVirtualNetwork:     b.LinkToVirtualNetwork(),\n\t\tSKUName:            new(ig.Spec.MachineType),\n\t\tComputerNamePrefix: new(ig.Name),\n\t\tAdminUser:          new(b.Cluster.Spec.CloudProvider.Azure.AdminUser),\n\t\tZones:              azNumbers,\n\t}\n\n\tswitch ig.Spec.Role {\n\tcase kops.InstanceGroupRoleControlPlane:\n\t\tt.ApplicationSecurityGroups = append(t.ApplicationSecurityGroups, b.LinkToApplicationSecurityGroupControlPlane())\n\tcase kops.InstanceGroupRoleNode:\n\t\tt.ApplicationSecurityGroups = append(t.ApplicationSecurityGroups, b.LinkToApplicationSecurityGroupNodes())\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unexpected instance group role for instance group: %q, %q\", ig.Name, ig.Spec.Role)\n\t}\n\n\tvar err error\n\tif t.Capacity, err = getCapacity(&ig.Spec); err != nil {\n\t\treturn nil, err\n\t}\n\n\tsp, err := getStorageProfile(&ig.Spec)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tt.StorageProfile = &azuretasks.VMScaleSetStorageProfile{\n\t\tVirtualMachineScaleSetStorageProfile: sp,\n\t}\n\n\tif n := len(b.SSHPublicKeys); n > 0 {\n\t\tif n > 1 {\n\t\t\treturn nil, fmt.Errorf(\"expected at most one SSH public key; found %d keys\", n)","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/azuremodel/vmscaleset.go#L106-L142","documentation":"buildVMScaleSetTask hit an unhandled instance group role — only control-plane and node are mapped for Azure VM scale sets; both the IG name and its role value are printed.","triggerScenarios":"Thrown at pkg/model/azuremodel/vmscaleset.go:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the instance group's role is ControlPlane or Node on Azure","Remove or fix unsupported-role instance groups","Report upstream if the role should be supported"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}