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 of volume to mount"
      },
      "accessModes": {
         "items": {
            "$ref": "#/$defs/VolumeAccessMode"
         },
         "title": "Access mode",
         "type": "array"
      },
      "storageClassName": {
         "title": "Storage class",
         "type": "string"
      },
      "resources": {
         "allOf": [
            {
               "$ref": "#/$defs/PVCVolumeResources"
            }
         ],
         "title": "Resources for volume"
      },
      "readOnly": {
         "default": false,
         "description": "If set to true, forces 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: list[VolumeAccessMode] [Required] (name 'access_modes')#
field readOnly: bool = False (name 'read_only')#

If set to true, forces all mounts of this volume to read-only

field resources: PVCVolumeResources [Required]#
field storageClassName: str [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