Search or ask Docker

ClusterVolumeSpec

ClusterVolumeSpec schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

Cluster-specific options used to create the volume.
AccessMode

Type: object

Defines how the volume is used by tasks.
AccessibilityRequirements

Type: object

Requirements for the accessible topology of the volume. These fields are optional. For an in-depth description of what these fields mean, see the CSI specification.
Preferred

Type: array

A list of topologies that the volume should attempt to be provisioned in.
All schema constraints and annotations
{
  "description": "A list of topologies that the volume should attempt to be\nprovisioned in.\n",
  "items": {
    "$ref": "#/components/schemas/Topology"
  },
  "type": "array"
}
Requisite

Type: array

A list of required topologies, at least one of which the volume must be accessible from.
All schema constraints and annotations
{
  "description": "A list of required topologies, at least one of which the\nvolume must be accessible from.\n",
  "items": {
    "$ref": "#/components/schemas/Topology"
  },
  "type": "array"
}
All schema constraints and annotations
{
  "description": "Requirements for the accessible topology of the volume. These\nfields are optional. For an in-depth description of what these\nfields mean, see the CSI specification.\n",
  "properties": {
    "Preferred": {
      "description": "A list of topologies that the volume should attempt to be\nprovisioned in.\n",
      "items": {
        "$ref": "#/components/schemas/Topology"
      },
      "type": "array"
    },
    "Requisite": {
      "description": "A list of required topologies, at least one of which the\nvolume must be accessible from.\n",
      "items": {
        "$ref": "#/components/schemas/Topology"
      },
      "type": "array"
    }
  },
  "type": "object"
}
Availability

Type: string

The availability of the volume for use in tasks.

  • active The volume is fully available for scheduling on the cluster
  • pause No new workloads should use the volume, but existing workloads are not stopped.
  • drain All workloads using this volume should be stopped and rescheduled, and no new ones should be started.
All schema constraints and annotations
{
  "default": "active",
  "description": "The availability of the volume for use in tasks.\n- `active` The volume is fully available for scheduling on the cluster\n- `pause` No new workloads should use the volume, but existing workloads are not stopped.\n- `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started.\n",
  "enum": [
    "active",
    "pause",
    "drain"
  ],
  "type": "string",
  "x-nullable": false
}
CapacityRange

Type: object

The desired capacity that the volume should be created with. If empty, the plugin will decide the capacity.
LimitBytes

Type: integer

The volume must not be bigger than this. The value of 0 indicates an unspecified maximum.
All schema constraints and annotations
{
  "description": "The volume must not be bigger than this. The value of 0\nindicates an unspecified maximum.\n",
  "format": "int64",
  "type": "integer"
}
RequiredBytes

Type: integer

The volume must be at least this big. The value of 0 indicates an unspecified minimum
All schema constraints and annotations
{
  "description": "The volume must be at least this big. The value of 0\nindicates an unspecified minimum\n",
  "format": "int64",
  "type": "integer"
}
All schema constraints and annotations
{
  "description": "The desired capacity that the volume should be created with. If\nempty, the plugin will decide the capacity.\n",
  "properties": {
    "LimitBytes": {
      "description": "The volume must not be bigger than this. The value of 0\nindicates an unspecified maximum.\n",
      "format": "int64",
      "type": "integer"
    },
    "RequiredBytes": {
      "description": "The volume must be at least this big. The value of 0\nindicates an unspecified minimum\n",
      "format": "int64",
      "type": "integer"
    }
  },
  "type": "object"
}
MountVolume

Type: object

Options for using this volume as a Mount-type volume.

Either MountVolume or BlockVolume, but not both, must be
present.

properties: FsType: type: "string" description: | Specifies the filesystem type for the mount volume. Optional. MountFlags: type: "array" description: | Flags to pass when mounting the volume. Optional. items: type: "string" BlockVolume: type: "object" description: | Options for using this volume as a Block-type volume. Intentionally empty.

All schema constraints and annotations
{
  "description": "Options for using this volume as a Mount-type volume.\n\n    Either MountVolume or BlockVolume, but not both, must be\n    present.\n  properties:\n    FsType:\n      type: \"string\"\n      description: |\n        Specifies the filesystem type for the mount volume.\n        Optional.\n    MountFlags:\n      type: \"array\"\n      description: |\n        Flags to pass when mounting the volume. Optional.\n      items:\n        type: \"string\"\nBlockVolume:\n  type: \"object\"\n  description: |\n    Options for using this volume as a Block-type volume.\n    Intentionally empty.\n",
  "type": "object"
}
Scope

Type: string

The set of nodes this volume can be used on at one time.

  • single The volume may only be scheduled to one node at a time.
  • multi the volume may be scheduled to any supported number of nodes at a time.
All schema constraints and annotations
{
  "default": "single",
  "description": "The set of nodes this volume can be used on at one time.\n- `single` The volume may only be scheduled to one node at a time.\n- `multi` the volume may be scheduled to any supported number of nodes at a time.\n",
  "enum": [
    "single",
    "multi"
  ],
  "type": "string",
  "x-nullable": false
}
Secrets

Type: array

Swarm Secrets that are passed to the CSI storage plugin when operating on this volume.
Array item

Type: object

One cluster volume secret entry. Defines a key-value pair that is passed to the plugin.
All schema constraints and annotations
{
  "description": "One cluster volume secret entry. Defines a key-value pair that\nis passed to the plugin.\n",
  "properties": {
    "Key": {
      "description": "Key is the name of the key of the key-value pair passed to\nthe plugin.\n",
      "type": "string"
    },
    "Secret": {
      "description": "Secret is the swarm Secret object from which to read data.\nThis can be a Secret name or ID. The Secret data is\nretrieved by swarm and used as the value of the key-value\npair passed to the plugin.\n",
      "type": "string"
    }
  },
  "type": "object"
}
All schema constraints and annotations
{
  "description": "Swarm Secrets that are passed to the CSI storage plugin when\noperating on this volume.\n",
  "items": {
    "description": "One cluster volume secret entry. Defines a key-value pair that\nis passed to the plugin.\n",
    "properties": {
      "Key": {
        "description": "Key is the name of the key of the key-value pair passed to\nthe plugin.\n",
        "type": "string"
      },
      "Secret": {
        "description": "Secret is the swarm Secret object from which to read data.\nThis can be a Secret name or ID. The Secret data is\nretrieved by swarm and used as the value of the key-value\npair passed to the plugin.\n",
        "type": "string"
      }
    },
    "type": "object"
  },
  "type": "array"
}
Sharing

Type: string

The number and way that different tasks can use this volume at one time.

  • none The volume may only be used by one task at a time.
  • readonly The volume may be used by any number of tasks, but they all must mount the volume as readonly
  • onewriter The volume may be used by any number of tasks, but only one may mount it as read/write.
  • all The volume may have any number of readers and writers.
All schema constraints and annotations
{
  "default": "none",
  "description": "The number and way that different tasks can use this volume\nat one time.\n- `none` The volume may only be used by one task at a time.\n- `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly\n- `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write.\n- `all` The volume may have any number of readers and writers.\n",
  "enum": [
    "none",
    "readonly",
    "onewriter",
    "all"
  ],
  "type": "string",
  "x-nullable": false
}
All schema constraints and annotations
{
  "description": "Defines how the volume is used by tasks.\n",
  "properties": {
    "AccessibilityRequirements": {
      "description": "Requirements for the accessible topology of the volume. These\nfields are optional. For an in-depth description of what these\nfields mean, see the CSI specification.\n",
      "properties": {
        "Preferred": {
          "description": "A list of topologies that the volume should attempt to be\nprovisioned in.\n",
          "items": {
            "$ref": "#/components/schemas/Topology"
          },
          "type": "array"
        },
        "Requisite": {
          "description": "A list of required topologies, at least one of which the\nvolume must be accessible from.\n",
          "items": {
            "$ref": "#/components/schemas/Topology"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "Availability": {
      "default": "active",
      "description": "The availability of the volume for use in tasks.\n- `active` The volume is fully available for scheduling on the cluster\n- `pause` No new workloads should use the volume, but existing workloads are not stopped.\n- `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started.\n",
      "enum": [
        "active",
        "pause",
        "drain"
      ],
      "type": "string",
      "x-nullable": false
    },
    "CapacityRange": {
      "description": "The desired capacity that the volume should be created with. If\nempty, the plugin will decide the capacity.\n",
      "properties": {
        "LimitBytes": {
          "description": "The volume must not be bigger than this. The value of 0\nindicates an unspecified maximum.\n",
          "format": "int64",
          "type": "integer"
        },
        "RequiredBytes": {
          "description": "The volume must be at least this big. The value of 0\nindicates an unspecified minimum\n",
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "MountVolume": {
      "description": "Options for using this volume as a Mount-type volume.\n\n    Either MountVolume or BlockVolume, but not both, must be\n    present.\n  properties:\n    FsType:\n      type: \"string\"\n      description: |\n        Specifies the filesystem type for the mount volume.\n        Optional.\n    MountFlags:\n      type: \"array\"\n      description: |\n        Flags to pass when mounting the volume. Optional.\n      items:\n        type: \"string\"\nBlockVolume:\n  type: \"object\"\n  description: |\n    Options for using this volume as a Block-type volume.\n    Intentionally empty.\n",
      "type": "object"
    },
    "Scope": {
      "default": "single",
      "description": "The set of nodes this volume can be used on at one time.\n- `single` The volume may only be scheduled to one node at a time.\n- `multi` the volume may be scheduled to any supported number of nodes at a time.\n",
      "enum": [
        "single",
        "multi"
      ],
      "type": "string",
      "x-nullable": false
    },
    "Secrets": {
      "description": "Swarm Secrets that are passed to the CSI storage plugin when\noperating on this volume.\n",
      "items": {
        "description": "One cluster volume secret entry. Defines a key-value pair that\nis passed to the plugin.\n",
        "properties": {
          "Key": {
            "description": "Key is the name of the key of the key-value pair passed to\nthe plugin.\n",
            "type": "string"
          },
          "Secret": {
            "description": "Secret is the swarm Secret object from which to read data.\nThis can be a Secret name or ID. The Secret data is\nretrieved by swarm and used as the value of the key-value\npair passed to the plugin.\n",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "Sharing": {
      "default": "none",
      "description": "The number and way that different tasks can use this volume\nat one time.\n- `none` The volume may only be used by one task at a time.\n- `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly\n- `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write.\n- `all` The volume may have any number of readers and writers.\n",
      "enum": [
        "none",
        "readonly",
        "onewriter",
        "all"
      ],
      "type": "string",
      "x-nullable": false
    }
  },
  "type": "object"
}
Group

Type: string

Group defines the volume group of this volume. Volumes belonging to the same group can be referred to by group name when creating Services. Referring to a volume by group instructs Swarm to treat volumes in that group interchangeably for the purpose of scheduling. Volumes with an empty string for a group technically all belong to the same, emptystring group.
All schema constraints and annotations
{
  "description": "Group defines the volume group of this volume. Volumes belonging to\nthe same group can be referred to by group name when creating\nServices.  Referring to a volume by group instructs Swarm to treat\nvolumes in that group interchangeably for the purpose of scheduling.\nVolumes with an empty string for a group technically all belong to\nthe same, emptystring group.\n",
  "type": "string"
}
All schema constraints and annotations
{
  "description": "Cluster-specific options used to create the volume.\n",
  "properties": {
    "AccessMode": {
      "description": "Defines how the volume is used by tasks.\n",
      "properties": {
        "AccessibilityRequirements": {
          "description": "Requirements for the accessible topology of the volume. These\nfields are optional. For an in-depth description of what these\nfields mean, see the CSI specification.\n",
          "properties": {
            "Preferred": {
              "description": "A list of topologies that the volume should attempt to be\nprovisioned in.\n",
              "items": {
                "$ref": "#/components/schemas/Topology"
              },
              "type": "array"
            },
            "Requisite": {
              "description": "A list of required topologies, at least one of which the\nvolume must be accessible from.\n",
              "items": {
                "$ref": "#/components/schemas/Topology"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "Availability": {
          "default": "active",
          "description": "The availability of the volume for use in tasks.\n- `active` The volume is fully available for scheduling on the cluster\n- `pause` No new workloads should use the volume, but existing workloads are not stopped.\n- `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started.\n",
          "enum": [
            "active",
            "pause",
            "drain"
          ],
          "type": "string",
          "x-nullable": false
        },
        "CapacityRange": {
          "description": "The desired capacity that the volume should be created with. If\nempty, the plugin will decide the capacity.\n",
          "properties": {
            "LimitBytes": {
              "description": "The volume must not be bigger than this. The value of 0\nindicates an unspecified maximum.\n",
              "format": "int64",
              "type": "integer"
            },
            "RequiredBytes": {
              "description": "The volume must be at least this big. The value of 0\nindicates an unspecified minimum\n",
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object"
        },
        "MountVolume": {
          "description": "Options for using this volume as a Mount-type volume.\n\n    Either MountVolume or BlockVolume, but not both, must be\n    present.\n  properties:\n    FsType:\n      type: \"string\"\n      description: |\n        Specifies the filesystem type for the mount volume.\n        Optional.\n    MountFlags:\n      type: \"array\"\n      description: |\n        Flags to pass when mounting the volume. Optional.\n      items:\n        type: \"string\"\nBlockVolume:\n  type: \"object\"\n  description: |\n    Options for using this volume as a Block-type volume.\n    Intentionally empty.\n",
          "type": "object"
        },
        "Scope": {
          "default": "single",
          "description": "The set of nodes this volume can be used on at one time.\n- `single` The volume may only be scheduled to one node at a time.\n- `multi` the volume may be scheduled to any supported number of nodes at a time.\n",
          "enum": [
            "single",
            "multi"
          ],
          "type": "string",
          "x-nullable": false
        },
        "Secrets": {
          "description": "Swarm Secrets that are passed to the CSI storage plugin when\noperating on this volume.\n",
          "items": {
            "description": "One cluster volume secret entry. Defines a key-value pair that\nis passed to the plugin.\n",
            "properties": {
              "Key": {
                "description": "Key is the name of the key of the key-value pair passed to\nthe plugin.\n",
                "type": "string"
              },
              "Secret": {
                "description": "Secret is the swarm Secret object from which to read data.\nThis can be a Secret name or ID. The Secret data is\nretrieved by swarm and used as the value of the key-value\npair passed to the plugin.\n",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "Sharing": {
          "default": "none",
          "description": "The number and way that different tasks can use this volume\nat one time.\n- `none` The volume may only be used by one task at a time.\n- `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly\n- `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write.\n- `all` The volume may have any number of readers and writers.\n",
          "enum": [
            "none",
            "readonly",
            "onewriter",
            "all"
          ],
          "type": "string",
          "x-nullable": false
        }
      },
      "type": "object"
    },
    "Group": {
      "description": "Group defines the volume group of this volume. Volumes belonging to\nthe same group can be referred to by group name when creating\nServices.  Referring to a volume by group instructs Swarm to treat\nvolumes in that group interchangeably for the purpose of scheduling.\nVolumes with an empty string for a group technically all belong to\nthe same, emptystring group.\n",
      "type": "string"
    }
  },
  "type": "object"
}