Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created January 14, 2019 18:54
Show Gist options
  • Select an option

  • Save j-griffith/1e96326d0b66c00039b776f26a8be464 to your computer and use it in GitHub Desktop.

Select an option

Save j-griffith/1e96326d0b66c00039b776f26a8be464 to your computer and use it in GitHub Desktop.
// ignored when VolumeName is set
// +optional
Selector *metav1.LabelSelector
// Resources represents the minimum resources required
// +optional
Resources ResourceRequirements
// VolumeName is the binding reference to the PersistentVolume backing this
// claim. When set to non-empty value Selector is not evaluated
// +optional
VolumeName string
// Name of the StorageClass required by the claim.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
// +optional
StorageClassName *string
// volumeMode defines what type of volume is required by the claim.
// Value of Filesystem is implied when not included in claim spec.
// This is a beta feature.
// +optional
VolumeMode *PersistentVolumeMode
// This field requires the VolumeSnapshotDataSource alpha feature gate to be
// enabled and currently VolumeSnapshot is the only supported data source.
// If the provisioner can support VolumeSnapshot data source, it will create
// a new volume and data will be restored to the volume at the same time.
// If the provisioner does not support VolumeSnapshot data source, volume will
// not be created and the failure will be reported as an event.
// In the future, we plan to support more data source types and the behavior
// of the provisioner may change.
// +optional
DataSource *TypedLocalObjectReference
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
type TypedLocalObjectReference struct {
// APIGroup is the group for the resource being referenced.
// If APIGroup is not specified, the specified Kind must be in the core API group.
// For any other third-party types, APIGroup is required.
// +optional
APIGroup *string
// Kind is the type of resource being referenced
Kind string
// Name is the name of resource being referenced
Name string
// Optional: Extra driver options if any.
// +optional
Options map[string]string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment