Add validation for Container.Env

This includes backwards compat with the older "key" field.
This commit is contained in:
Tim Hockin
2014-07-01 15:56:30 -07:00
parent a8a0039a39
commit 839f2aed7b
3 changed files with 71 additions and 10 deletions

View File

@@ -92,7 +92,10 @@ type VolumeMount struct {
// EnvVar represents an environment variable present in a Container
type EnvVar struct {
// Required: This must be a C_IDENTIFIER.
// Exactly one of the following must be set. If both are set, prefer Name.
// DEPRECATED: EnvVar.Key will be removed in a future version of the API.
Name string `yaml:"name" json:"name"`
Key string `yaml:"key,omitempty" json:"name,omitempty"`
// Optional: defaults to "".
Value string `yaml:"value,omitempty" json:"value,omitempty"`
}