PVCVolumeSource¶
- pydantic model controller.config.PVCVolumeSource¶
A PVC to create to materialize the volume to mount in the container.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "PVCVolumeSource", "description": "A PVC to create to materialize the volume to mount in the container.", "type": "object", "properties": { "type": { "const": "persistentVolumeClaim", "title": "Type", "type": "string" }, "accessModes": { "items": { "$ref": "#/$defs/VolumeAccessMode" }, "title": "Access mode", "type": "array" }, "storageClassName": { "title": "Storage class", "type": "string" }, "resources": { "$ref": "#/$defs/PVCVolumeResources", "title": "Resources for volume" }, "readOnly": { "default": false, "description": "Whether to force all mounts of this volume to read-only", "title": "Is read-only", "type": "boolean" } }, "$defs": { "PVCVolumeResources": { "additionalProperties": false, "description": "Resources for a persistent volume claim.", "properties": { "requests": { "additionalProperties": { "type": "string" }, "title": "Resource requests", "type": "object" } }, "required": [ "requests" ], "title": "PVCVolumeResources", "type": "object" }, "VolumeAccessMode": { "description": "Access mode for a persistent volume.\n\nThe access modes ``ReadWriteOnce`` and ``ReadWriteOncePod`` are valid\naccess modes in Kubernetes but are intentionally not listed here because\nthey cannot work with user labs or file servers and therefore should be\nrejected by configuration parsing. This should change in the future if\naccess modes are used in other contexts where those access modes may make\nsense.", "enum": [ "ReadOnlyMany", "ReadWriteMany" ], "title": "VolumeAccessMode", "type": "string" } }, "additionalProperties": false, "required": [ "type", "accessModes", "storageClassName", "resources" ] }
- Fields:
- field accessModes: Annotated[list[VolumeAccessMode], Field(title='Access mode')] [Required] (name 'access_modes')¶
- field readOnly: Annotated[bool, Field(title='Is read-only', description='Whether to force all mounts of this volume to read-only')] = False (name 'read_only')¶
Whether to force all mounts of this volume to read-only
- field resources: Annotated[PVCVolumeResources, Field(title='Resources for volume')] [Required]¶
- field storageClassName: Annotated[str, Field(title='Storage class')] [Required] (name 'storage_class_name')¶
- field type: Literal['persistentVolumeClaim'] [Required]¶
- to_kubernetes_spec()¶
Convert to the Kubernetes representation.
- Returns:
Corresponding persistente volume claim spec.
- Return type:
kubernetes_asyncio.client.models.V1PersistentVolumeClaimSpec