diff --git a/pkg/api/types.go b/pkg/api/types.go index 7e7b9ac8171..4bd281e2ae1 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -508,26 +508,26 @@ type VolumeMount struct { type EnvVar struct { // Required: This must be a C_IDENTIFIER. 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"` - // 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"` } // EnvVarSource represents a source for the value of an EnvVar. -// Only one of its members may be specified. 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"` } // ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelector struct { - // The API version the FieldPath is written in terms of. - // If no value is specified, it will be defaulted from the APIVersion - // the enclosing object is created with. + // Required: Version of the schema the FieldPath is written in terms of. + // If no value is specified, it will be defaulted to the APIVersion of the + // enclosing object. 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"` } diff --git a/pkg/api/v1beta1/types.go b/pkg/api/v1beta1/types.go index 712b8cece02..68186c417ff 100644 --- a/pkg/api/v1beta1/types.go +++ b/pkg/api/v1beta1/types.go @@ -397,25 +397,25 @@ type EnvVar struct { // 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"` 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"` - // 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"` } // EnvVarSource represents a source for the value of an EnvVar. -// Only one of its members may be specified. 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"` } // ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelector struct { - // The API version the FieldPath is written in terms of. - APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` - // The 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"` + // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1beta1" + APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1beta1"` + // Required: 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. diff --git a/pkg/api/v1beta2/types.go b/pkg/api/v1beta2/types.go index 224d5726f16..b83ab1ca4f5 100644 --- a/pkg/api/v1beta2/types.go +++ b/pkg/api/v1beta2/types.go @@ -381,25 +381,25 @@ type VolumeMount struct { type EnvVar struct { // Required: This 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"` - // 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"` } // EnvVarSource represents a source for the value of an EnvVar. -// Only one of its members may be specified. 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"` } // ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelector struct { - // The API version the FieldPath is written in terms of. - APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` - // The 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"` + // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1beta2" + APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1beta2"` + // Required: 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. diff --git a/pkg/api/v1beta3/types.go b/pkg/api/v1beta3/types.go index 57d284e26d2..e4f03527d97 100644 --- a/pkg/api/v1beta3/types.go +++ b/pkg/api/v1beta3/types.go @@ -519,25 +519,25 @@ type VolumeMount struct { type EnvVar struct { // Required: This 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"` - // 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"` } // EnvVarSource represents a source for the value of an EnvVar. -// Only one of its members may be specified. 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"` } // ObjectFieldSelector selects an APIVersioned field of an object. type ObjectFieldSelector struct { - // The API version the FieldPath is written in terms of. - APIVersion string `json:"apiVersion,omitempty" description="The API version that FieldPath is written in terms of"` - // The 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"` + // Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1beta3" + APIVersion string `json:"apiVersion,omitempty" description:"version of the schema that fieldPath is written in terms of; defaults to v1beta3"` + // Required: 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.