Skip to content

Commit

Permalink
make PodIP.IP and HostIP.IP required.
Browse files Browse the repository at this point in the history
Fields used as map keys must be required or defaulted when used in a CRD schema.

see kubernetes/kubernetes#124540

Signed-off-by: Lan Liang <gcslyp@gmail.com>

Kubernetes-commit: 3ba8e9e80ee3123d5936fdfb95095418008a8756
  • Loading branch information
liangyuanpeng authored and k8s-publishing-bot committed May 16, 2024
1 parent 48606d9 commit 02ab4fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4340,13 +4340,15 @@ type PodDNSConfigOption struct {
// PodIP represents a single IP address allocated to the pod.
type PodIP struct {
// IP is the IP address assigned to the pod
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
// +required
IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
}

// HostIP represents a single IP address allocated to the host.
type HostIP struct {
// IP is the IP address assigned to the host
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
// +required
IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
}

// EphemeralContainerCommon is a copy of all fields in Container to be inlined in
Expand Down

0 comments on commit 02ab4fd

Please sign in to comment.