From 2ecb883ff42477bd85ee243dcc2ed1a1306f720a Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Mon, 27 Apr 2015 20:48:28 -0400 Subject: [PATCH] Fix omitempty attributes on downward api --- pkg/api/types.go | 6 +++--- pkg/api/v1beta1/types.go | 4 ++-- pkg/api/v1beta2/types.go | 4 ++-- pkg/api/v1beta3/types.go | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/api/types.go b/pkg/api/types.go index 4bd281e2ae1..15ce2042ae7 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -518,7 +518,7 @@ type EnvVar struct { // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // Required: Selects a field of the pod; only name and namespace are supported. - FieldPath *ObjectFieldSelector `json:"fieldPath,omitempty"` + FieldPath *ObjectFieldSelector `json:"fieldPath"` } // ObjectFieldSelector selects an APIVersioned field of an object. @@ -526,9 +526,9 @@ type ObjectFieldSelector struct { // 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"` + APIVersion string `json:"apiVersion"` // Required: Path of the field to select in the specified API version - FieldPath string `json:"fieldPath,omitempty"` + FieldPath string `json:"fieldPath"` } // HTTPGetAction describes an action based on HTTP Get requests. diff --git a/pkg/api/v1beta1/types.go b/pkg/api/v1beta1/types.go index 68186c417ff..52ab9fb31b4 100644 --- a/pkg/api/v1beta1/types.go +++ b/pkg/api/v1beta1/types.go @@ -407,7 +407,7 @@ type EnvVar struct { // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // 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" description:"selects a field of the pod; only name and namespace are supported"` } // ObjectFieldSelector selects an APIVersioned field of an object. @@ -415,7 +415,7 @@ type ObjectFieldSelector struct { // 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"` + FieldPath string `json:"fieldPath" 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 b83ab1ca4f5..5c822d17d30 100644 --- a/pkg/api/v1beta2/types.go +++ b/pkg/api/v1beta2/types.go @@ -391,7 +391,7 @@ type EnvVar struct { // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // 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" description:"selects a field of the pod; only name and namespace are supported"` } // ObjectFieldSelector selects an APIVersioned field of an object. @@ -399,7 +399,7 @@ type ObjectFieldSelector struct { // 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"` + FieldPath string `json:"fieldPath" 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 e4f03527d97..a9f8d162496 100644 --- a/pkg/api/v1beta3/types.go +++ b/pkg/api/v1beta3/types.go @@ -529,7 +529,7 @@ type EnvVar struct { // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { // 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" description:"selects a field of the pod; only name and namespace are supported"` } // ObjectFieldSelector selects an APIVersioned field of an object. @@ -537,7 +537,7 @@ type ObjectFieldSelector struct { // 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"` + FieldPath string `json:"fieldPath" description:"path of the field to select in the specified API version"` } // HTTPGetAction describes an action based on HTTP Get requests.