• Kubernetes Submit Queue's avatar
    Merge pull request #36133 from luomiao/photon-support-PR-v2 · b3e4083f
    Kubernetes Submit Queue authored
    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.
    b3e4083f
Name
Last commit
Last update
..
providers Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
cloud.go Loading commit data...
doc.go Loading commit data...
plugins.go Loading commit data...