Documentation
¶
Overview ¶
package clusterspec provides options for the volume cluster volume spec.
Index ¶
- type Availability
- type SetClusterVolumeSpecOption
- func WithAccessMode(setters ...accessmode.SetAccessModeOption) SetClusterVolumeSpecOption
- func WithAccessibilityRequirements(setters ...accessibility.SetAccessibilityRequirementsOption) SetClusterVolumeSpecOption
- func WithAvailability(availability Availability) SetClusterVolumeSpecOption
- func WithCapacityRange(requiredBytes int64, limitBytes int64) SetClusterVolumeSpecOption
- func WithGroup(group string) SetClusterVolumeSpecOption
- func WithSecrets(key string, secret string) SetClusterVolumeSpecOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Availability ¶
type Availability string
Availability specifies the availability of the volume.
const ( // AvailabilityActive indicates that the volume is active and fully // schedulable on the cluster. AvailabilityActive Availability = "active" // AvailabilityPause indicates that no new workloads should use the // volume, but existing workloads can continue to use it. AvailabilityPause Availability = "pause" // AvailabilityDrain indicates that all workloads using this volume // should be rescheduled, and the volume unpublished from all nodes. AvailabilityDrain Availability = "drain" )
type SetClusterVolumeSpecOption ¶
type SetClusterVolumeSpecOption func(*volume.ClusterVolumeSpec) error
SetClusterVolumeSpecOption is a function that sets a parameter for the volume cluster volume spec.
func WithAccessMode ¶
func WithAccessMode(setters ...accessmode.SetAccessModeOption) SetClusterVolumeSpecOption
WithAccessMode sets the access mode of the volume. AccessMode defines how the volume is used by tasks.
func WithAccessibilityRequirements ¶
func WithAccessibilityRequirements(setters ...accessibility.SetAccessibilityRequirementsOption) SetClusterVolumeSpecOption
WithAccessabilityRequirements sets the accessability requirements of the volume. AccessibilityRequirements specifies where in the cluster a volume must be accessible from.
This field must be empty if the plugin does not support VOLUME_ACCESSIBILITY_CONSTRAINTS capabilities. If it is present but the plugin does not support it, volume will not be created.
If AccessibilityRequirements is empty, but the plugin does support VOLUME_ACCESSIBILITY_CONSTRAINTS, then Swarmkit will assume the entire cluster is a valid target for the volume.
func WithAvailability ¶
func WithAvailability(availability Availability) SetClusterVolumeSpecOption
WithAvailability sets the availability of the volume.
Availability is the Volume's desired availability. Analogous to Node Availability, this allows the user to take volumes offline in order to update or delete them.
func WithCapacityRange ¶
func WithCapacityRange(requiredBytes int64, limitBytes int64) SetClusterVolumeSpecOption
WithCapacityRange sets the capacity range of the volume.
CapacityRange defines the desired capacity that the volume should be created with. If WithCapacityRange is not called, the plugin will decide the capacity.
func WithGroup ¶
func WithGroup(group string) SetClusterVolumeSpecOption
WithGroup sets 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.
func WithSecrets ¶
func WithSecrets(key string, secret string) SetClusterVolumeSpecOption
WithSecrets appends the secrets of the volume.
Secrets defines Swarm Secrets that are passed to the CSI storage plugin when operating on this volume.
Directories
¶
| Path | Synopsis |
|---|---|
|
package accessibility provides options for the volume cluster volume spec accessibility requirements.
|
package accessibility provides options for the volume cluster volume spec accessibility requirements. |
|
package accessmode provides options for the volume cluster volume spec access mode.
|
package accessmode provides options for the volume cluster volume spec access mode. |