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

azure: Move configuration of resource group in storage class. #65443

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

jsafrane
Copy link
Member

@jsafrane jsafrane commented Jun 25, 2018

What this PR does / why we need it:
This moves configuration of Azure resource group into storage class. Users can't configure dynamic provisioning in PVCs, because that makes the PVC not portable to other Kubernetes installations, possibly on other clouds.

/sig storage
/assign @andyzhangx

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 25, 2018
@k8s-ci-robot k8s-ci-robot requested review from msau42 and saad-ali June 25, 2018 15:43
@andyzhangx
Copy link
Member

@jsafrane Thanks for the PR, let me test it first.

@andyzhangx
Copy link
Member

FYI @rootfs @khenidak we are going to add another field in azure disk storage class: resourcegroup, I over estimated the orignal API change impact, actually it's a little change... Anyway, I would like to do a test for this scenario first, just wait for my test result, thanks.

@jsafrane jsafrane changed the title azure: Allow configuration of resource group in storage class. azure: Move configuration of resource group in storage class. Jun 27, 2018
@jsafrane
Copy link
Member Author

@andyzhangx, I removed the annotation completely, this would be the first case where user can configure dynamic provisioning in PVC and it would make the PVC not portable to other cloud. Please proceed with the review and picks to older releases.

k8s-github-robot pushed a commit that referenced this pull request Jun 27, 2018
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 #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
Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 27, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, jsafrane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@jsafrane
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

@jsafrane: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce 291f277 link /test pull-kubernetes-e2e-gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 64246, 65489, 65443). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 23000cf into kubernetes:master Jun 27, 2018
@andyzhangx
Copy link
Member

@jsafrane thanks, I will cherry-pick this PR later.

jpbetz added a commit that referenced this pull request Jul 10, 2018
…5443-upstream-release-1.8

Automated cherry pick of #65443: azure: Move configuration of resource group in storage class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants