mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-02-08 02:10:33 +00:00
Automatic merge from submit-queue (batch tested with PRs 65492, 65516, 65447). 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>. fix azure disk creation issue when specifying external resource group **What this PR does / why we need it**: fix azure disk creation issue when specifying external resource group, after azure disk creation succeeded, it fails to get azure disk state since it's still using original resource group **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #65515 **Special notes for your reviewer**: Together with https://github.com/kubernetes/kubernetes/pull/65443, this feature has been done, I will cherry-pick to prior versions later. So in the end, we have two ways to make azure disk dynamic provision under an external resource group - specify `resourcegroup` parameter in azure disk storage class ``` kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: hdd provisioner: kubernetes.io/azure-disk parameters: skuname: Standard_LRS kind: managed cachingmode: None resourcegroup: USER-SPECIFIED-RG ``` - specify `volume.beta.kubernetes.io/resource-group` in PVC annotations ``` kind: PersistentVolumeClaim apiVersion: v1 metadata: name: pvc-azuredisk annotations: volume.beta.kubernetes.io/resource-group: "USER-SPECIFIED-RG" spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi storageClassName: hdd ``` **Release note**: ``` fix azure disk issue when specifying external resource group ``` /kind bug /sig azure @jsafrane @rootfs Just FYI @khenidak @brendandburns @feiskyer