Skip to content

Commit 02ab4fd

Browse files
liangyuanpengk8s-publishing-bot
authored andcommitted
make PodIP.IP and HostIP.IP required.
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 <[email protected]> Kubernetes-commit: 3ba8e9e80ee3123d5936fdfb95095418008a8756
1 parent 48606d9 commit 02ab4fd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

core/v1/generated.proto

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/v1/types.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -4340,13 +4340,15 @@ type PodDNSConfigOption struct {
43404340
// PodIP represents a single IP address allocated to the pod.
43414341
type PodIP struct {
43424342
// IP is the IP address assigned to the pod
4343-
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
4343+
// +required
4344+
IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
43444345
}
43454346

43464347
// HostIP represents a single IP address allocated to the host.
43474348
type HostIP struct {
43484349
// IP is the IP address assigned to the host
4349-
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
4350+
// +required
4351+
IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
43504352
}
43514353

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

0 commit comments

Comments
 (0)