Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

vCenter SPBM policy integration for dynamic volume provisioning inside kubernetes #131

Closed
BaluDontu opened this issue Apr 12, 2017 · 7 comments
Assignees
Labels
Projects

Comments

@BaluDontu
Copy link

BaluDontu commented Apr 12, 2017

Till now, vSphere CP provides support to configure persistent volume with VSAN storage capabilities - kubernetes#42974. Right now this only works with VSAN.

Also there might be other use cases:

  1. But the user might need a way to configure a policy on other datastores like VMFS, NFS etc.
  2. How to use SIOC, VMCrypt policies for a persistent disk.

We can achieve about 2 use cases by using existing storage policies which are already created on vCenter. The user will specify the SPBM policy ID as part of dynamic provisioning and volume will have the policy configured with it.

This feature will allow you to specify the SPBM policy ID as part of dynamic volume provisioning. The created persistent volume will have the SPBM policy ID associated with it. Also, the user will be able to see the associations of persistent volume object with the policy on the vCenter.

For example,

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: fast
provisioner: kubernetes.io/vsphere-volume
parameters:
diskformat: zeroedthick
storagepolicyName: policy1
datastore: VMFSDatastore

@BaluDontu BaluDontu added this to In-Progress in vSphere Apr 12, 2017
@pdhamdhere
Copy link

Why specify by ID? User should able to specify policy by SPBM Policy name.

@BaluDontu
Copy link
Author

BaluDontu commented Apr 13, 2017

This requires change to the VsphereVirtualDiskVolumeSource struct in kubernetes core - https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L1092

We will add a new field storagePolicyID and storagePolicyName which is a optional string field in the struct. Since we are changing the API in kubernetes, we have to go through the process mentioned here - https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md

Once this field is merged, we have to live with it for backward compatibility. We can't remove it again.

We want this field to be added because while creating a volume we know the policyID value which is specified by the user. But this policyID is not available on AttachVolume() call which is needed to be specified on the reconfigure call for the SPBM association to persist and made available on VC. So we would need to modify the structure to get the policyID for such calls.

@BaluDontu BaluDontu added the P0 label Apr 18, 2017
@BaluDontu
Copy link
Author

Generate GO bindings for SPBM - #135

SPBM API's to be implemented in goVmomi - #136

@BaluDontu
Copy link
Author

ETA - 05/11. I will have an internal vmware PR for review by 05/11 EOD.

I will also create a new PR for test case automation of SPBM policy integration. ETA for this test would be 05/17.

@tusharnt

@BaluDontu
Copy link
Author

Internal PR out for review - #142

@BaluDontu
Copy link
Author

e2e tests issue - #141

@BaluDontu
Copy link
Author

BaluDontu commented May 26, 2017

vSphere storage policy support for dynamic volume provisioning support PR - kubernetes#46176. This PR is merged and will be available in 1.7 release cut due next week week.

@BaluDontu BaluDontu moved this from In-Progress to In open PR in vSphere May 26, 2017
@BaluDontu BaluDontu moved this from In open PR to Done in vSphere Jun 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

2 participants