mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
mark ContainerImage.names as optional
kubelet is the only writer of v1.Node .status.images[].names. When an image has neither RepoDigests nor RepoTags, the value gets stored in etcd as null. Marking the field as optional can help JSON API clients to avoid hitting serialization error when the returned status contains null .status.images[].names.
This commit is contained in:
parent
3cc0ca0988
commit
1652e59c9b
@ -4206,6 +4206,7 @@ type PodSignature struct {
|
||||
// ContainerImage describe a container image
|
||||
type ContainerImage struct {
|
||||
// Names by which this image is known.
|
||||
// +optional
|
||||
Names []string
|
||||
// The size of the image in bytes.
|
||||
// +optional
|
||||
|
@ -4872,6 +4872,7 @@ type PodSignature struct {
|
||||
type ContainerImage struct {
|
||||
// Names by which this image is known.
|
||||
// e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
|
||||
// +optional
|
||||
Names []string `json:"names" protobuf:"bytes,1,rep,name=names"`
|
||||
// The size of the image in bytes.
|
||||
// +optional
|
||||
|
Loading…
Reference in New Issue
Block a user