@@ -44,7 +44,7 @@ type ClTcxAttachInfo struct {
4444 // by providing a list of interface names, enabling auto discovery, or setting
4545 // the primaryNodeInterface flag, but only one option is allowed.
4646 // +required
47- InterfaceSelector InterfaceSelector `json:"interfaceSelector"`
47+ InterfaceSelector InterfaceSelector `json:"interfaceSelector,omitzero "`
4848
4949 // networkNamespaces is an optional field that identifies the set of network
5050 // namespaces in which to attach the eBPF program. If networkNamespaces is not
@@ -63,7 +63,7 @@ type ClTcxAttachInfo struct {
6363 // transmitted by the interface.
6464 // +required
6565 // +kubebuilder:validation:Enum=Ingress;Egress
66- Direction TCDirectionType `json:"direction"`
66+ Direction TCDirectionType `json:"direction,omitempty "`
6767
6868 // priority is an optional field and determines the execution order of the TCX
6969 // program relative to other TCX programs attached to the same attachment
@@ -96,21 +96,23 @@ type ClTcxAttachInfoState struct {
9696 // interfaceName is the name of the interface the TCX program should be
9797 // attached. interfaceName must not exceed 63 characters in length.
9898 // +required
99+ // +kubebuilder:validation:MinLength=1
99100 // +kubebuilder:validation:MaxLength=63
100- InterfaceName string `json:"interfaceName"`
101+ InterfaceName string `json:"interfaceName,omitempty "`
101102
102103 // netnsPath is the optional path to the network namespace inside of which the
103104 // TCX program should be attached. If not provided, the default network
104105 // namespace is used. netnsPath must not exceed 1023 characters in length.
105106 // +optional
107+ // +kubebuilder:validation:MinLength=1
106108 // +kubebuilder:validation:MaxLength=1023
107109 NetnsPath string `json:"netnsPath,omitempty"`
108110
109111 // direction is the provisioned direction of traffic, Ingress or Egress, the TC
110112 // program should be attached for a given network device.
111113 // +required
112114 // +kubebuilder:validation:Enum=Ingress;Egress
113- Direction TCDirectionType `json:"direction"`
115+ Direction TCDirectionType `json:"direction,omitempty "`
114116
115117 // priority is the provisioned priority of the TCX program in relation to other
116118 // programs of the same type with the same attach point. It is a value from 0
0 commit comments