Add validation of VolumeMounts

This commit is contained in:
Tim Hockin
2014-07-04 19:46:56 -07:00
parent 40c71e8292
commit dd6b209617
3 changed files with 76 additions and 1 deletions

View File

@@ -84,7 +84,10 @@ type VolumeMount struct {
// Optional: Defaults to false (read-write).
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
// Required.
// Exactly one of the following must be set. If both are set, prefer MountPath.
// DEPRECATED: Path will be removed in a future version of the API.
MountPath string `yaml:"mountPath,omitempty" json:"mountPath,omitempty"`
Path string `yaml:"Path,omitempty" json:"Path,omitempty"`
// One of: "LOCAL" (local volume) or "HOST" (external mount from the host). Default: LOCAL.
MountType string `yaml:"mountType,omitempty" json:"mountType,omitempty"`
}