From 2c563b358c6bee3831273eb3d34511d7576562e4 Mon Sep 17 00:00:00 2001 From: Hang Yan Date: Thu, 5 Sep 2024 11:15:25 +0800 Subject: [PATCH] updates Signed-off-by: Hang Yan --- build/charts/antrea/crds/packetcapture.yaml | 1 + pkg/apis/crd/v1alpha1/types.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/charts/antrea/crds/packetcapture.yaml b/build/charts/antrea/crds/packetcapture.yaml index df49ced4a6d..e5a4df38e7b 100644 --- a/build/charts/antrea/crds/packetcapture.yaml +++ b/build/charts/antrea/crds/packetcapture.yaml @@ -94,6 +94,7 @@ spec: default: IPv4 protocol: x-kubernetes-int-or-string: true + enum: [ICMP, TCP, UDP, 1, 6, 17] default: ICMP transportHeader: type: object diff --git a/pkg/apis/crd/v1alpha1/types.go b/pkg/apis/crd/v1alpha1/types.go index 18d48eecc5c..2f08fcc46aa 100644 --- a/pkg/apis/crd/v1alpha1/types.go +++ b/pkg/apis/crd/v1alpha1/types.go @@ -406,7 +406,8 @@ type TCPHeader struct { type Packet struct { // IPFamily is the filter's IP family . default to `IPv4`. IPFamily v1.IPFamily `json:"ipFamily"` - // Protocol represents the transport protocol. default to ICMP(1). + // Protocol represents the transport protocol. default to ICMP(1). Other + // possible choices are: TCP(6), UDP(17). Protocol *intstr.IntOrString `json:"protocol,omitempty"` TransportHeader TransportHeader `json:"transportHeader"` }