Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Hang Yan <yhang@vmware.com>
  • Loading branch information
hangyan committed May 14, 2024
1 parent 8e39897 commit 7015500
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions pkg/apis/crd/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,79 +19,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type TraceflowPhase string

const (
// Pending is not used anymore
Pending TraceflowPhase = "Pending"
Running TraceflowPhase = "Running"
Succeeded TraceflowPhase = "Succeeded"
Failed TraceflowPhase = "Failed"
)

type TraceflowComponent string

const (
ComponentSpoofGuard TraceflowComponent = "SpoofGuard"
ComponentLB TraceflowComponent = "LB"
ComponentRouting TraceflowComponent = "Routing"
ComponentNetworkPolicy TraceflowComponent = "NetworkPolicy"
ComponentForwarding TraceflowComponent = "Forwarding"
ComponentEgress TraceflowComponent = "Egress"
)

type TraceflowAction string

const (
ActionDelivered TraceflowAction = "Delivered"
ActionReceived TraceflowAction = "Received"
ActionForwarded TraceflowAction = "Forwarded"
ActionDropped TraceflowAction = "Dropped"
ActionRejected TraceflowAction = "Rejected"
// ActionForwardedOutOfOverlay indicates that the packet has been forwarded out of the network
// managed by Antrea. This indicates that the Traceflow request can be considered complete.
ActionForwardedOutOfOverlay TraceflowAction = "ForwardedOutOfOverlay"
ActionMarkedForSNAT TraceflowAction = "MarkedForSNAT"
ActionForwardedToEgressNode TraceflowAction = "ForwardedToEgressNode"
)

// List the supported protocols and their codes in packetcapture.
// According to code in Antrea agent and controller, default protocol is ICMP if protocol is not provided by users.
const (
ICMPProtocolNumber int32 = 1
IGMPProtocolNumber int32 = 2
TCPProtocolNumber int32 = 6
UDPProtocolNumber int32 = 17
SCTPProtocolNumber int32 = 132
)

var SupportedProtocols = map[string]int32{
"TCP": TCPProtocolNumber,
"UDP": UDPProtocolNumber,
"ICMP": ICMPProtocolNumber,
}

var ProtocolsToString = map[int32]string{
TCPProtocolNumber: "TCP",
UDPProtocolNumber: "UDP",
ICMPProtocolNumber: "ICMP",
IGMPProtocolNumber: "IGMP",
SCTPProtocolNumber: "SCTP",
}

// List the supported destination types in packetcapture.
const (
DstTypePod = "Pod"
DstTypeService = "Service"
DstTypeIPv4 = "IPv4"
)

var SupportedDestinationTypes = []string{
DstTypePod,
DstTypeService,
DstTypeIPv4,
}

// IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") that is allowed
// or denied to/from the workloads matched by a Spec.AppliedTo.
type IPBlock struct {
Expand Down

0 comments on commit 7015500

Please sign in to comment.