Fix downward API descriptions

This commit is contained in:
Paul Morie 2015-04-27 17:34:40 -04:00
parent 83093af8b0
commit 8bf0b03c17
4 changed files with 32 additions and 32 deletions

View File

@ -508,26 +508,26 @@ type VolumeMount struct {
type EnvVar struct { type EnvVar struct {
// Required: This must be a C_IDENTIFIER. // Required: This must be a C_IDENTIFIER.
Name string `json:"name"` Name string `json:"name"`
// Optional: defaults to "". // Optional: no more than one of the following may be specified.
// Optional: Defaults to "".
Value string `json:"value,omitempty"` Value string `json:"value,omitempty"`
// Optional: specify a source the value of this var should come from. // Optional: Specifies a source the value of this var should come from.
ValueFrom *EnvVarSource `json:"valueFrom,omitempty"` ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
} }
// EnvVarSource represents a source for the value of an EnvVar. // EnvVarSource represents a source for the value of an EnvVar.
// Only one of its members may be specified.
type EnvVarSource struct { type EnvVarSource struct {
// Selects a field of the pod; only name and namespace are supported. // Required: Selects a field of the pod; only name and namespace are supported.
FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty"` FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty"`
} }
// ObjectFieldSelector selects an APIVersioned field of an object. // ObjectFieldSelector selects an APIVersioned field of an object.
type ObjectFieldSelector struct { type ObjectFieldSelector struct {
// The API version the FieldPath is written in terms of. // Required: Version of the schema the FieldPath is written in terms of.
// If no value is specified, it will be defaulted from the APIVersion // If no value is specified, it will be defaulted to the APIVersion of the
// the enclosing object is created with. // enclosing object.
APIVersion string `json:"apiVersion,omitempty"` APIVersion string `json:"apiVersion,omitempty"`
// The path of the field to select in the specified API version // Required: Path of the field to select in the specified API version
FieldPath string `json:"fieldPath,omitempty"` FieldPath string `json:"fieldPath,omitempty"`
} }

View File

@ -397,25 +397,25 @@ type EnvVar struct {
// DEPRECATED: EnvVar.Key will be removed in a future version of the API. // DEPRECATED: EnvVar.Key will be removed in a future version of the API.
Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"` Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"`
Key string `json:"key,omitempty" description:"name of the environment variable; must be a C_IDENTIFIER; deprecated - use name instead"` Key string `json:"key,omitempty" description:"name of the environment variable; must be a C_IDENTIFIER; deprecated - use name instead"`
// Optional: defaults to "". // Optional: No more than one of the following may be set.
// Optional: Defaults to ""
Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"` Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"`
// Optional: specify a source the value of this var should come from. // Optional: Specifies a source the value of this var should come from.
ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"` ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"`
} }
// EnvVarSource represents a source for the value of an EnvVar. // EnvVarSource represents a source for the value of an EnvVar.
// Only one of its members may be specified.
type EnvVarSource struct { type EnvVarSource struct {
// Selects a field of the pod; only name and namespace are supported. // Required: Selects a field of the pod; only name and namespace are supported.
FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"` FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"`
} }
// ObjectFieldSelector selects an APIVersioned field of an object. // ObjectFieldSelector selects an APIVersioned field of an object.
type ObjectFieldSelector struct { type ObjectFieldSelector struct {
// The API version the FieldPath is written in terms of. // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1beta1"
APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1beta1"`
// The path of the field to select in the specified API version // Required: Path of the field to select in the specified API version
FieldPath string `json:"fieldPath,omitempty" description="The path of the field to select in the specified API version"` FieldPath string `json:"fieldPath,omitempty" description:"path of the field to select in the specified API version"`
} }
// HTTPGetAction describes an action based on HTTP Get requests. // HTTPGetAction describes an action based on HTTP Get requests.

View File

@ -381,25 +381,25 @@ type VolumeMount struct {
type EnvVar struct { type EnvVar struct {
// Required: This must be a C_IDENTIFIER. // Required: This must be a C_IDENTIFIER.
Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"` Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"`
// Optional: defaults to "". // Optional: No more than one of the following may be set.
// Optional: Defaults to ""
Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"` Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"`
// Optional: specify a source the value of this var should come from. // Optional: Specifies a source the value of this var should come from.
ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"` ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"`
} }
// EnvVarSource represents a source for the value of an EnvVar. // EnvVarSource represents a source for the value of an EnvVar.
// Only one of its members may be specified.
type EnvVarSource struct { type EnvVarSource struct {
// Selects a field of the pod; only name and namespace are supported. // Required: Selects a field of the pod; only name and namespace are supported.
FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"` FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"`
} }
// ObjectFieldSelector selects an APIVersioned field of an object. // ObjectFieldSelector selects an APIVersioned field of an object.
type ObjectFieldSelector struct { type ObjectFieldSelector struct {
// The API version the FieldPath is written in terms of. // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1beta2"
APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1beta2"`
// The path of the field to select in the specified API version // Required: Path of the field to select in the specified API version
FieldPath string `json:"fieldPath,omitempty" description="The path of the field to select in the specified API version"` FieldPath string `json:"fieldPath,omitempty" description:"path of the field to select in the specified API version"`
} }
// HTTPGetAction describes an action based on HTTP Get requests. // HTTPGetAction describes an action based on HTTP Get requests.

View File

@ -519,25 +519,25 @@ type VolumeMount struct {
type EnvVar struct { type EnvVar struct {
// Required: This must be a C_IDENTIFIER. // Required: This must be a C_IDENTIFIER.
Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"` Name string `json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"`
// Optional: defaults to "". // Optional: No more than one of the following may be set.
// Optional: Defaults to ""
Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"` Value string `json:"value,omitempty" description:"value of the environment variable; defaults to empty string"`
// Optional: specify a source the value of this var should come from. // Optional: Specifies a source the value of this var should come from.
ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"` ValueFrom *EnvVarSource `json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"`
} }
// EnvVarSource represents a source for the value of an EnvVar. // EnvVarSource represents a source for the value of an EnvVar.
// Only one of its members may be specified.
type EnvVarSource struct { type EnvVarSource struct {
// Selects a field of the pod; only name and namespace are supported. // Required: Selects a field of the pod; only name and namespace are supported.
FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"` FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty" description:"selects a field of the pod; only name and namespace are supported"`
} }
// ObjectFieldSelector selects an APIVersioned field of an object. // ObjectFieldSelector selects an APIVersioned field of an object.
type ObjectFieldSelector struct { type ObjectFieldSelector struct {
// The API version the FieldPath is written in terms of. // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1beta3"
APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1beta3"`
// The path of the field to select in the specified API version // Required: Path of the field to select in the specified API version
FieldPath string `json:"fieldPath,omitempty" description="The path of the field to select in the specified API version"` FieldPath string `json:"fieldPath,omitempty" description:"path of the field to select in the specified API version"`
} }
// HTTPGetAction describes an action based on HTTP Get requests. // HTTPGetAction describes an action based on HTTP Get requests.