Merge pull request #36133 from luomiao/photon-support-PR-v2
Automatic merge from submit-queue Support persistent volume usage for kubernetes running on Photon Controller platform **What this PR does / why we need it:** Enable the persistent volume usage for kubernetes running on Photon platform. Photon Controller: https://vmware.github.io/photon-controller/ _Only the first commit include the real code change. The following commits are for third-party vendor dependency and auto-generated code/docs updating._ Two components are added: pkg/cloudprovider/providers/photon: support Photon Controller as cloud provider pkg/volume/photon_pd: support Photon persistent disk as volume source for persistent volume Usage introduction: a. Photon Controller is supported as cloud provider. When choosing to use photon controller as a cloud provider, "--cloud-provider=photon --cloud-config=[path_to_config_file]" is required for kubelet/kube-controller-manager/kube-apiserver. The config file of Photon Controller should follow the following usage: ``` [Global] target = http://[photon_controller_endpoint_IP] ignoreCertificate = true tenant = [tenant_name] project = [project_name] overrideIP = true ``` b. Photon persistent disk is supported as volume source/persistent volume source. yaml usage: ``` volumes: - name: photon-storage-1 photonPersistentDisk: pdID: "643ed4e2-3fcc-482b-96d0-12ff6cab2a69" ``` pdID is the persistent disk ID from Photon Controller. c. Enable Photon Controller as volume provisioner. yaml usage: ``` kind: StorageClass apiVersion: storage.k8s.io/v1beta1 metadata: name: gold_sc provisioner: kubernetes.io/photon-pd parameters: flavor: persistent-disk-gold ``` The flavor "persistent-disk-gold" needs to be created by Photon platform admin before hand.
This commit is contained in:
@@ -10556,11 +10556,18 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
||||
Ref: spec.MustCreateRef("#/definitions/v1.AzureDiskVolumeSource"),
|
||||
},
|
||||
},
|
||||
"photonPersistentDisk": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
|
||||
Ref: spec.MustCreateRef("#/definitions/v1.PhotonPersistentDiskVolumeSource"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"photonPersistentDisk"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"v1.AWSElasticBlockStoreVolumeSource", "v1.AzureDiskVolumeSource", "v1.AzureFileVolumeSource", "v1.CephFSVolumeSource", "v1.CinderVolumeSource", "v1.FCVolumeSource", "v1.FlexVolumeSource", "v1.FlockerVolumeSource", "v1.GCEPersistentDiskVolumeSource", "v1.GlusterfsVolumeSource", "v1.HostPathVolumeSource", "v1.ISCSIVolumeSource", "v1.NFSVolumeSource", "v1.QuobyteVolumeSource", "v1.RBDVolumeSource", "v1.VsphereVirtualDiskVolumeSource"},
|
||||
"v1.AWSElasticBlockStoreVolumeSource", "v1.AzureDiskVolumeSource", "v1.AzureFileVolumeSource", "v1.CephFSVolumeSource", "v1.CinderVolumeSource", "v1.FCVolumeSource", "v1.FlexVolumeSource", "v1.FlockerVolumeSource", "v1.GCEPersistentDiskVolumeSource", "v1.GlusterfsVolumeSource", "v1.HostPathVolumeSource", "v1.ISCSIVolumeSource", "v1.NFSVolumeSource", "v1.PhotonPersistentDiskVolumeSource", "v1.QuobyteVolumeSource", "v1.RBDVolumeSource", "v1.VsphereVirtualDiskVolumeSource"},
|
||||
},
|
||||
"v1.PersistentVolumeSpec": {
|
||||
Schema: spec.Schema{
|
||||
@@ -10644,6 +10651,31 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
||||
},
|
||||
Dependencies: []string{},
|
||||
},
|
||||
"v1.PhotonPersistentDiskVolumeSource": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Represents a Photon Controller persistent disk resource.",
|
||||
Properties: map[string]spec.Schema{
|
||||
"pdID": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "ID that identifies Photon Controller persistent disk",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"fsType": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"pdID", "fsType"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{},
|
||||
},
|
||||
"v1.Pod": {
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
@@ -13145,11 +13177,18 @@ var OpenAPIDefinitions *common.OpenAPIDefinitions = &common.OpenAPIDefinitions{
|
||||
Ref: spec.MustCreateRef("#/definitions/v1.AzureDiskVolumeSource"),
|
||||
},
|
||||
},
|
||||
"photonPersistentDisk": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
|
||||
Ref: spec.MustCreateRef("#/definitions/v1.PhotonPersistentDiskVolumeSource"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"photonPersistentDisk"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"v1.AWSElasticBlockStoreVolumeSource", "v1.AzureDiskVolumeSource", "v1.AzureFileVolumeSource", "v1.CephFSVolumeSource", "v1.CinderVolumeSource", "v1.ConfigMapVolumeSource", "v1.DownwardAPIVolumeSource", "v1.EmptyDirVolumeSource", "v1.FCVolumeSource", "v1.FlexVolumeSource", "v1.FlockerVolumeSource", "v1.GCEPersistentDiskVolumeSource", "v1.GitRepoVolumeSource", "v1.GlusterfsVolumeSource", "v1.HostPathVolumeSource", "v1.ISCSIVolumeSource", "v1.NFSVolumeSource", "v1.PersistentVolumeClaimVolumeSource", "v1.QuobyteVolumeSource", "v1.RBDVolumeSource", "v1.SecretVolumeSource", "v1.VsphereVirtualDiskVolumeSource"},
|
||||
"v1.AWSElasticBlockStoreVolumeSource", "v1.AzureDiskVolumeSource", "v1.AzureFileVolumeSource", "v1.CephFSVolumeSource", "v1.CinderVolumeSource", "v1.ConfigMapVolumeSource", "v1.DownwardAPIVolumeSource", "v1.EmptyDirVolumeSource", "v1.FCVolumeSource", "v1.FlexVolumeSource", "v1.FlockerVolumeSource", "v1.GCEPersistentDiskVolumeSource", "v1.GitRepoVolumeSource", "v1.GlusterfsVolumeSource", "v1.HostPathVolumeSource", "v1.ISCSIVolumeSource", "v1.NFSVolumeSource", "v1.PersistentVolumeClaimVolumeSource", "v1.PhotonPersistentDiskVolumeSource", "v1.QuobyteVolumeSource", "v1.RBDVolumeSource", "v1.SecretVolumeSource", "v1.VsphereVirtualDiskVolumeSource"},
|
||||
},
|
||||
"v1.VsphereVirtualDiskVolumeSource": {
|
||||
Schema: spec.Schema{
|
||||
|
||||
Reference in New Issue
Block a user