Volume ================================== .. 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 | +=================================+======================================+ | awsElasticBlockStore_fsType | | +---------------------------------+--------------------------------------+ | awsElasticBlockStore_partition | | +---------------------------------+--------------------------------------+ | awsElasticBlockStore_readOnly | | +---------------------------------+--------------------------------------+ | awsElasticBlockStore_volumeID | | +---------------------------------+--------------------------------------+ | azureDisk_cachingMode | | +---------------------------------+--------------------------------------+ | azureDisk_diskName | | +---------------------------------+--------------------------------------+ | azureDisk_diskURI | | +---------------------------------+--------------------------------------+ | azureDisk_fsType | | +---------------------------------+--------------------------------------+ | azureDisk_kind | | +---------------------------------+--------------------------------------+ | azureDisk_readOnly | | +---------------------------------+--------------------------------------+ | azureFile_readOnly | | +---------------------------------+--------------------------------------+ | azureFile_secretName | | +---------------------------------+--------------------------------------+ | azureFile_shareName | | +---------------------------------+--------------------------------------+ | cephfs_monitors | <[]string> | +---------------------------------+--------------------------------------+ | cephfs_path | | +---------------------------------+--------------------------------------+ | cephfs_readOnly | | +---------------------------------+--------------------------------------+ | cephfs_secretFile | | +---------------------------------+--------------------------------------+ | cephfs_secretRef_name | | +---------------------------------+--------------------------------------+ | cephfs_user | | +---------------------------------+--------------------------------------+ | cinder_fsType | | +---------------------------------+--------------------------------------+ | cinder_readOnly | | +---------------------------------+--------------------------------------+ | cinder_secretRef_name | | +---------------------------------+--------------------------------------+ | cinder_volumeID | | +---------------------------------+--------------------------------------+ | configMap_defaultMode | | +---------------------------------+--------------------------------------+ | configMap_items | <[]COMPONENT.ConfigMapItem> | +---------------------------------+--------------------------------------+ | configMap_name | | +---------------------------------+--------------------------------------+ | configMap_optional | | +---------------------------------+--------------------------------------+ | csi_driver | | +---------------------------------+--------------------------------------+ | csi_fsType | | +---------------------------------+--------------------------------------+ | csi_nodePublishSecretRef_name | | +---------------------------------+--------------------------------------+ | csi_readOnly | | +---------------------------------+--------------------------------------+ | csi_volumeAttributes | | +---------------------------------+--------------------------------------+ | downwardAPI_defaultMode | | +---------------------------------+--------------------------------------+ | downwardAPI_items | <[]COMPONENT.DownwardAPIItem> | +---------------------------------+--------------------------------------+ | emptyDir_medium | | +---------------------------------+--------------------------------------+ | emptyDir_sizeLimit | | +---------------------------------+--------------------------------------+ | fc_fsType | | +---------------------------------+--------------------------------------+ | fc_lun | | +---------------------------------+--------------------------------------+ | fc_readOnly | | +---------------------------------+--------------------------------------+ | fc_targetWWNs | <[]string> | +---------------------------------+--------------------------------------+ | fc_wwids | <[]string> | +---------------------------------+--------------------------------------+ | flexVolume_driver | | +---------------------------------+--------------------------------------+ | flexVolume_fsType | | +---------------------------------+--------------------------------------+ | flexVolume_options | | +---------------------------------+--------------------------------------+ | flexVolume_readOnly | | +---------------------------------+--------------------------------------+ | flexVolume_secretRef_name | | +---------------------------------+--------------------------------------+ | flocker_datasetName | | +---------------------------------+--------------------------------------+ | flocker_datasetUUID | | +---------------------------------+--------------------------------------+ | gcePersistentDisk_fsType | | +---------------------------------+--------------------------------------+ | gcePersistentDisk_partition | | +---------------------------------+--------------------------------------+ | gcePersistentDisk_pdName | | +---------------------------------+--------------------------------------+ | gcePersistentDisk_readOnly | | +---------------------------------+--------------------------------------+ | gitRepo_directory | | +---------------------------------+--------------------------------------+ | gitRepo_repository | | +---------------------------------+--------------------------------------+ | gitRepo_revision | | +---------------------------------+--------------------------------------+ | glusterfs_endpoints | | +---------------------------------+--------------------------------------+ | glusterfs_path | | +---------------------------------+--------------------------------------+ | glusterfs_readOnly | | +---------------------------------+--------------------------------------+ | hostPath_path | | +---------------------------------+--------------------------------------+ | hostPath_type | | +---------------------------------+--------------------------------------+ | iscsi_chapAuthDiscovery | | +---------------------------------+--------------------------------------+ | iscsi_chapAuthSession | | +---------------------------------+--------------------------------------+ | iscsi_fsType | | +---------------------------------+--------------------------------------+ | iscsi_initiatorName | | +---------------------------------+--------------------------------------+ | iscsi_iqn | | +---------------------------------+--------------------------------------+ | iscsi_iscsiInterface | | +---------------------------------+--------------------------------------+ | iscsi_lun | | +---------------------------------+--------------------------------------+ | iscsi_portals | <[]string> | +---------------------------------+--------------------------------------+ | iscsi_readOnly | | +---------------------------------+--------------------------------------+ | iscsi_secretRef_name | | +---------------------------------+--------------------------------------+ | iscsi_targetPortal | | +---------------------------------+--------------------------------------+ | name | | +---------------------------------+--------------------------------------+ | nfs_path | | +---------------------------------+--------------------------------------+ | nfs_readOnly | | +---------------------------------+--------------------------------------+ | nfs_server | | +---------------------------------+--------------------------------------+ | persistentVolumeClaim_claimName | | +---------------------------------+--------------------------------------+ | persistentVolumeClaim_readOnly | | +---------------------------------+--------------------------------------+ | photonPersistentDisk_fsType | | +---------------------------------+--------------------------------------+ | photonPersistentDisk_pdID | | +---------------------------------+--------------------------------------+ | portworxVolume_fsType | | +---------------------------------+--------------------------------------+ | portworxVolume_readOnly | | +---------------------------------+--------------------------------------+ | portworxVolume_volumeID | | +---------------------------------+--------------------------------------+ | projected_defaultMode | | +---------------------------------+--------------------------------------+ | projected_sources | <[]COMPONENT.ProjectedVolumeSources> | +---------------------------------+--------------------------------------+ | quobyte_group | | +---------------------------------+--------------------------------------+ | quobyte_readOnly | | +---------------------------------+--------------------------------------+ | quobyte_registry | | +---------------------------------+--------------------------------------+ | quobyte_tenant | | +---------------------------------+--------------------------------------+ | quobyte_user | | +---------------------------------+--------------------------------------+ | quobyte_volume | | +---------------------------------+--------------------------------------+ | rbd_fsType | | +---------------------------------+--------------------------------------+ | rbd_image | | +---------------------------------+--------------------------------------+ | rbd_keyring | | +---------------------------------+--------------------------------------+ | rbd_monitors | <[]string> | +---------------------------------+--------------------------------------+ | rbd_pool | | +---------------------------------+--------------------------------------+ | rbd_readOnly | | +---------------------------------+--------------------------------------+ | rbd_secretRef_name | | +---------------------------------+--------------------------------------+ | rbd_user | | +---------------------------------+--------------------------------------+ | scaleIO_fsType | | +---------------------------------+--------------------------------------+ | scaleIO_gateway | | +---------------------------------+--------------------------------------+ | scaleIO_protectionDomain | | +---------------------------------+--------------------------------------+ | scaleIO_readOnly | | +---------------------------------+--------------------------------------+ | scaleIO_secretRef_name | | +---------------------------------+--------------------------------------+ | scaleIO_sslEnabled | | +---------------------------------+--------------------------------------+ | scaleIO_storageMode | | +---------------------------------+--------------------------------------+ | scaleIO_storagePool | | +---------------------------------+--------------------------------------+ | scaleIO_system | | +---------------------------------+--------------------------------------+ | scaleIO_volumeName | | +---------------------------------+--------------------------------------+ | secret_defaultMode | | +---------------------------------+--------------------------------------+ | secret_items | <[]COMPONENT.SecretItem> | +---------------------------------+--------------------------------------+ | secret_optional | | +---------------------------------+--------------------------------------+ | secret_secretName | | +---------------------------------+--------------------------------------+ | storageos_fsType | | +---------------------------------+--------------------------------------+ | storageos_readOnly | | +---------------------------------+--------------------------------------+ | storageos_secretRef_name | | +---------------------------------+--------------------------------------+ | storageos_volumeName | | +---------------------------------+--------------------------------------+ | storageos_volumeNamespace | | +---------------------------------+--------------------------------------+ | vsphereVolume_fsType | | +---------------------------------+--------------------------------------+ | vsphereVolume_storagePolicyID | | +---------------------------------+--------------------------------------+ | vsphereVolume_storagePolicyName | | +---------------------------------+--------------------------------------+ | vsphereVolume_volumePath | | +---------------------------------+--------------------------------------+ JSON fields ----------- .. code-block:: JSON { "awsElasticBlockStore": { "fsType": "", "partition": "", "readOnly": "", "volumeID": "" }, "azureDisk": { "cachingMode": "", "diskName": "", "diskURI": "", "fsType": "", "kind": "", "readOnly": "" }, "azureFile": { "readOnly": "", "secretName": "", "shareName": "" }, "cephfs": { "monitors": "<[]string>", "path": "", "readOnly": "", "secretFile": "", "secretRef": { "name": "" }, "user": "" }, "cinder": { "fsType": "", "readOnly": "", "secretRef": { "name": "" }, "volumeID": "" }, "configMap": { "defaultMode": "", "items": "<[]COMPONENT.ConfigMapItem>", "name": "", "optional": "" }, "csi": { "driver": "", "fsType": "", "nodePublishSecretRef": { "name": "" }, "readOnly": "", "volumeAttributes": "" }, "downwardAPI": { "defaultMode": "", "items": "<[]COMPONENT.DownwardAPIItem>" }, "emptyDir": { "medium": "", "sizeLimit": "" }, "fc": { "fsType": "", "lun": "", "readOnly": "", "targetWWNs": "<[]string>", "wwids": "<[]string>" }, "flexVolume": { "driver": "", "fsType": "", "options": "", "readOnly": "", "secretRef": { "name": "" } }, "flocker": { "datasetName": "", "datasetUUID": "" }, "gcePersistentDisk": { "fsType": "", "partition": "", "pdName": "", "readOnly": "" }, "gitRepo": { "directory": "", "repository": "", "revision": "" }, "glusterfs": { "endpoints": "", "path": "", "readOnly": "" }, "hostPath": { "path": "", "type": "" }, "iscsi": { "chapAuthDiscovery": "", "chapAuthSession": "", "fsType": "", "initiatorName": "", "iqn": "", "iscsiInterface": "", "lun": "", "portals": "<[]string>", "readOnly": "", "secretRef": { "name": "" }, "targetPortal": "" }, "name": "", "nfs": { "path": "", "readOnly": "", "server": "" }, "persistentVolumeClaim": { "claimName": "", "readOnly": "" }, "photonPersistentDisk": { "fsType": "", "pdID": "" }, "portworxVolume": { "fsType": "", "readOnly": "", "volumeID": "" }, "projected": { "defaultMode": "", "sources": "<[]COMPONENT.ProjectedVolumeSources>" }, "quobyte": { "group": "", "readOnly": "", "registry": "", "tenant": "", "user": "", "volume": "" }, "rbd": { "fsType": "", "image": "", "keyring": "", "monitors": "<[]string>", "pool": "", "readOnly": "", "secretRef": { "name": "" }, "user": "" }, "scaleIO": { "fsType": "", "gateway": "", "protectionDomain": "", "readOnly": "", "secretRef": { "name": "" }, "sslEnabled": "", "storageMode": "", "storagePool": "", "system": "", "volumeName": "" }, "secret": { "defaultMode": "", "items": "<[]COMPONENT.SecretItem>", "optional": "", "secretName": "" }, "storageos": { "fsType": "", "readOnly": "", "secretRef": { "name": "" }, "volumeName": "", "volumeNamespace": "" }, "vsphereVolume": { "fsType": "", "storagePolicyID": "", "storagePolicyName": "", "volumePath": "" } }