mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #65691 from jsafrane/azure-managed-error
Automatic merge from submit-queue (batch tested with PRs 65348, 65599, 65635, 65688, 65691). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. azure: Add validation of resourceGroup option. ResourceGroup can be set only on `kind: Managed` disks. **Release note**: ```release-note NONE ``` /assign @andyzhangx
This commit is contained in:
commit
f7d95e208a
@ -17,6 +17,7 @@ limitations under the License.
|
|||||||
package azure_dd
|
package azure_dd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -145,6 +146,10 @@ func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologie
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if resourceGroup != "" && kind != v1.AzureManagedDisk {
|
||||||
|
return nil, errors.New("StorageClass option 'resourceGroup' can be used only for managed disks")
|
||||||
|
}
|
||||||
|
|
||||||
// create disk
|
// create disk
|
||||||
diskURI := ""
|
diskURI := ""
|
||||||
if kind == v1.AzureManagedDisk {
|
if kind == v1.AzureManagedDisk {
|
||||||
|
Loading…
Reference in New Issue
Block a user