From 701c99b95c5bdfd6498331e90a3f9fe77d80e6d8 Mon Sep 17 00:00:00 2001 From: Guangya Liu Date: Sun, 2 Jul 2017 19:49:09 -0400 Subject: [PATCH] Made image as deliberately optional in v1 Container struct. --- staging/src/k8s.io/api/core/v1/types.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index c8532ed9004..d1a8f89cd2b 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -1887,7 +1887,10 @@ type Container struct { Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // Docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images - Image string `json:"image" protobuf:"bytes,2,opt,name=image"` + // This field is optional to allow higher level config management to default or override + // container images in workload controllers like Deployments and StatefulSets. + // +optional + Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` // Entrypoint array. Not executed within a shell. // The docker image's ENTRYPOINT is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable