PersistentVolume ================================== .. toctree:: :maxdepth: 2 :caption: Contents: ======== Functions --------- set +++ Set any specific field to a value **Args** * \*\*kwargs * Arbitrary list of keys as variables in formation of YAML path separated by underscores with their assocaited values. For example, to set the value at .. code-block:: JSON { "spec": { "template": { "spec": "" } } } use .. code-block:: Python obj.set(spec_template_spec="foobar") * You can also specify an incomplete path and k8sGen will attempt to find a unique location whose ending path matches what you have specified. For the case of the above structure, running .. code-block:: Python obj.set(template_spec="foobar") will set the same location because the only path that ends in 'template/spec' is 'spec/template/spec' **Returns** List of return values for each variable set Possible return values include: * True : value was set successfully * (False, 'invalid key name') : the key you are trying to set does not exist for this object * (False, 'abniguous key name') : the key you are trying to set does not refer to a unique location get +++ Get the values that have been set for specific fields **Args** * \*args * Arbitrary list of keys as variables in formation of YAML path separated by underscores **Returns** List of return values for each variable set Possible return values include: * {Value} : The key's value * (False, 'invalid key name') : the key you are trying to set does not exist for this object Key Names and Types ------------------- +-----------------------------------------------+--------------------------------+ | Key | Type | +===============================================+================================+ | apiVersion | v1 | +-----------------------------------------------+--------------------------------+ | kind | PersistentVolume | +-----------------------------------------------+--------------------------------+ | metadata | | +-----------------------------------------------+--------------------------------+ | spec_accessModes | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_awsElasticBlockStore_fsType | | +-----------------------------------------------+--------------------------------+ | spec_awsElasticBlockStore_partition | | +-----------------------------------------------+--------------------------------+ | spec_awsElasticBlockStore_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_awsElasticBlockStore_volumeID | | +-----------------------------------------------+--------------------------------+ | spec_azureDisk_cachingMode | | +-----------------------------------------------+--------------------------------+ | spec_azureDisk_diskName | | +-----------------------------------------------+--------------------------------+ | spec_azureDisk_diskURI | | +-----------------------------------------------+--------------------------------+ | spec_azureDisk_fsType | | +-----------------------------------------------+--------------------------------+ | spec_azureDisk_kind | | +-----------------------------------------------+--------------------------------+ | spec_azureDisk_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_azureFile_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_azureFile_secretName | | +-----------------------------------------------+--------------------------------+ | spec_azureFile_secretNamespace | | +-----------------------------------------------+--------------------------------+ | spec_azureFile_shareName | | +-----------------------------------------------+--------------------------------+ | spec_capacity | | +-----------------------------------------------+--------------------------------+ | spec_cephfs_monitors | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_cephfs_path | | +-----------------------------------------------+--------------------------------+ | spec_cephfs_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_cephfs_secretFile | | +-----------------------------------------------+--------------------------------+ | spec_cephfs_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_cephfs_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_cephfs_user | | +-----------------------------------------------+--------------------------------+ | spec_cinder_fsType | | +-----------------------------------------------+--------------------------------+ | spec_cinder_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_cinder_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_cinder_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_cinder_volumeID | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_apiVersion | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_fieldPath | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_kind | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_name | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_resourceVersion | | +-----------------------------------------------+--------------------------------+ | spec_claimRef_uid | | +-----------------------------------------------+--------------------------------+ | spec_csi_controllerExpandSecretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_csi_controllerExpandSecretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_csi_controllerPublishSecretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_csi_controllerPublishSecretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_csi_driver | | +-----------------------------------------------+--------------------------------+ | spec_csi_fsType | | +-----------------------------------------------+--------------------------------+ | spec_csi_nodePublishSecretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_csi_nodePublishSecretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_csi_nodeStageSecretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_csi_nodeStageSecretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_csi_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_csi_volumeAttributes | | +-----------------------------------------------+--------------------------------+ | spec_csi_volumeHandle | | +-----------------------------------------------+--------------------------------+ | spec_fc_fsType | | +-----------------------------------------------+--------------------------------+ | spec_fc_lun | | +-----------------------------------------------+--------------------------------+ | spec_fc_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_fc_targetWWNs | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_fc_wwids | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_flexVolume_driver | | +-----------------------------------------------+--------------------------------+ | spec_flexVolume_fsType | | +-----------------------------------------------+--------------------------------+ | spec_flexVolume_options | | +-----------------------------------------------+--------------------------------+ | spec_flexVolume_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_flexVolume_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_flexVolume_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_flocker_datasetName | | +-----------------------------------------------+--------------------------------+ | spec_flocker_datasetUUID | | +-----------------------------------------------+--------------------------------+ | spec_gcePersistentDisk_fsType | | +-----------------------------------------------+--------------------------------+ | spec_gcePersistentDisk_partition | | +-----------------------------------------------+--------------------------------+ | spec_gcePersistentDisk_pdName | | +-----------------------------------------------+--------------------------------+ | spec_gcePersistentDisk_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_glusterfs_endpoints | | +-----------------------------------------------+--------------------------------+ | spec_glusterfs_endpointsNamespace | | +-----------------------------------------------+--------------------------------+ | spec_glusterfs_path | | +-----------------------------------------------+--------------------------------+ | spec_glusterfs_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_hostPath_path | | +-----------------------------------------------+--------------------------------+ | spec_hostPath_type | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_chapAuthDiscovery | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_chapAuthSession | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_fsType | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_initiatorName | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_iqn | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_iscsiInterface | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_lun | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_portals | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_iscsi_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_iscsi_targetPortal | | +-----------------------------------------------+--------------------------------+ | spec_local_fsType | | +-----------------------------------------------+--------------------------------+ | spec_local_path | | +-----------------------------------------------+--------------------------------+ | spec_mountOptions | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_nfs_path | | +-----------------------------------------------+--------------------------------+ | spec_nfs_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_nfs_server | | +-----------------------------------------------+--------------------------------+ | spec_nodeAffinity_required_nodeSelectorTerms | <[]COMPONENT.NodeSelectorTerm> | +-----------------------------------------------+--------------------------------+ | spec_persistentVolumeReclaimPolicy | | +-----------------------------------------------+--------------------------------+ | spec_photonPersistentDisk_fsType | | +-----------------------------------------------+--------------------------------+ | spec_photonPersistentDisk_pdID | | +-----------------------------------------------+--------------------------------+ | spec_portworxVolume_fsType | | +-----------------------------------------------+--------------------------------+ | spec_portworxVolume_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_portworxVolume_volumeID | | +-----------------------------------------------+--------------------------------+ | spec_quobyte_group | | +-----------------------------------------------+--------------------------------+ | spec_quobyte_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_quobyte_registry | | +-----------------------------------------------+--------------------------------+ | spec_quobyte_tenant | | +-----------------------------------------------+--------------------------------+ | spec_quobyte_user | | +-----------------------------------------------+--------------------------------+ | spec_quobyte_volume | | +-----------------------------------------------+--------------------------------+ | spec_rbd_fsType | | +-----------------------------------------------+--------------------------------+ | spec_rbd_image | | +-----------------------------------------------+--------------------------------+ | spec_rbd_keyring | | +-----------------------------------------------+--------------------------------+ | spec_rbd_monitors | <[]string> | +-----------------------------------------------+--------------------------------+ | spec_rbd_pool | | +-----------------------------------------------+--------------------------------+ | spec_rbd_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_rbd_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_rbd_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_rbd_user | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_fsType | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_gateway | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_protectionDomain | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_sslEnabled | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_storageMode | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_storagePool | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_system | | +-----------------------------------------------+--------------------------------+ | spec_scaleIO_volumeName | | +-----------------------------------------------+--------------------------------+ | spec_storageClassName | | +-----------------------------------------------+--------------------------------+ | spec_storageos_fsType | | +-----------------------------------------------+--------------------------------+ | spec_storageos_readOnly | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_apiVersion | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_fieldPath | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_kind | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_name | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_namespace | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_resourceVersion | | +-----------------------------------------------+--------------------------------+ | spec_storageos_secretRef_uid | | +-----------------------------------------------+--------------------------------+ | spec_storageos_volumeName | | +-----------------------------------------------+--------------------------------+ | spec_storageos_volumeNamespace | | +-----------------------------------------------+--------------------------------+ | spec_volumeMode | | +-----------------------------------------------+--------------------------------+ | spec_vsphereVolume_fsType | | +-----------------------------------------------+--------------------------------+ | spec_vsphereVolume_storagePolicyID | | +-----------------------------------------------+--------------------------------+ | spec_vsphereVolume_storagePolicyName | | +-----------------------------------------------+--------------------------------+ | spec_vsphereVolume_volumePath | | +-----------------------------------------------+--------------------------------+ JSON fields ----------- .. code-block:: JSON { "apiVersion": "v1", "kind": "PersistentVolume", "metadata": "", "spec": { "accessModes": "<[]string>", "awsElasticBlockStore": { "fsType": "", "partition": "", "readOnly": "", "volumeID": "" }, "azureDisk": { "cachingMode": "", "diskName": "", "diskURI": "", "fsType": "", "kind": "", "readOnly": "" }, "azureFile": { "readOnly": "", "secretName": "", "secretNamespace": "", "shareName": "" }, "capacity": "", "cephfs": { "monitors": "<[]string>", "path": "", "readOnly": "", "secretFile": "", "secretRef": { "name": "", "namespace": "" }, "user": "" }, "cinder": { "fsType": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "volumeID": "" }, "claimRef": { "apiVersion": "", "fieldPath": "", "kind": "", "name": "", "namespace": "", "resourceVersion": "", "uid": "" }, "csi": { "controllerExpandSecretRef": { "name": "", "namespace": "" }, "controllerPublishSecretRef": { "name": "", "namespace": "" }, "driver": "", "fsType": "", "nodePublishSecretRef": { "name": "", "namespace": "" }, "nodeStageSecretRef": { "name": "", "namespace": "" }, "readOnly": "", "volumeAttributes": "", "volumeHandle": "" }, "fc": { "fsType": "", "lun": "", "readOnly": "", "targetWWNs": "<[]string>", "wwids": "<[]string>" }, "flexVolume": { "driver": "", "fsType": "", "options": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" } }, "flocker": { "datasetName": "", "datasetUUID": "" }, "gcePersistentDisk": { "fsType": "", "partition": "", "pdName": "", "readOnly": "" }, "glusterfs": { "endpoints": "", "endpointsNamespace": "", "path": "", "readOnly": "" }, "hostPath": { "path": "", "type": "" }, "iscsi": { "chapAuthDiscovery": "", "chapAuthSession": "", "fsType": "", "initiatorName": "", "iqn": "", "iscsiInterface": "", "lun": "", "portals": "<[]string>", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "targetPortal": "" }, "local": { "fsType": "", "path": "" }, "mountOptions": "<[]string>", "nfs": { "path": "", "readOnly": "", "server": "" }, "nodeAffinity": { "required": { "nodeSelectorTerms": "<[]COMPONENT.NodeSelectorTerm>" } }, "persistentVolumeReclaimPolicy": "", "photonPersistentDisk": { "fsType": "", "pdID": "" }, "portworxVolume": { "fsType": "", "readOnly": "", "volumeID": "" }, "quobyte": { "group": "", "readOnly": "", "registry": "", "tenant": "", "user": "", "volume": "" }, "rbd": { "fsType": "", "image": "", "keyring": "", "monitors": "<[]string>", "pool": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "user": "" }, "scaleIO": { "fsType": "", "gateway": "", "protectionDomain": "", "readOnly": "", "secretRef": { "name": "", "namespace": "" }, "sslEnabled": "", "storageMode": "", "storagePool": "", "system": "", "volumeName": "" }, "storageClassName": "", "storageos": { "fsType": "", "readOnly": "", "secretRef": { "apiVersion": "", "fieldPath": "", "kind": "", "name": "", "namespace": "", "resourceVersion": "", "uid": "" }, "volumeName": "", "volumeNamespace": "" }, "volumeMode": "", "vsphereVolume": { "fsType": "", "storagePolicyID": "", "storagePolicyName": "", "volumePath": "" } } }