v1alpha1

package
v0.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ICMPProtocol int32 = 1
	TCPProtocol  int32 = 6
	UDPProtocol  int32 = 17
)

List the supported protocols and their codes in traceflow. According to code in Antrea agent and controller, default protocol is ICMP if protocol is not inputted by users.

View Source
const (
	DstTypePod     = "Pod"
	DstTypeService = "Service"
	DstTypeIPv4    = "IPv4"
)

List the supported destination types in traceflow.

View Source
const (
	EtherTypeIPv4 uint16 = 0x0800
	EtherTypeIPv6 uint16 = 0x86DD
)

List the ethernet types.

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var ProtocolsToString = map[int32]string{
	TCPProtocol:  "TCP",
	UDPProtocol:  "UDP",
	ICMPProtocol: "ICMP",
}
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   "ops.antrea.tanzu.vmware.com",
	Version: "v1alpha1",
}
View Source
var SupportedDestinationTypes = []string{
	DstTypePod,
	DstTypeService,
	DstTypeIPv4,
}
View Source
var SupportedProtocols = map[string]int32{
	"TCP":  TCPProtocol,
	"UDP":  UDPProtocol,
	"ICMP": ICMPProtocol,
}

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type Destination

type Destination struct {
	// Namespace is the destination namespace.
	Namespace string `json:"namespace,omitempty"`
	// Pod is the destination pod, exclusive with destination service.
	Pod string `json:"pod,omitempty"`
	// Service is the destination service, exclusive with destination pod.
	Service string `json:"service,omitempty"`
	// IP is the destination IP.
	IP string `json:"ip,omitempty"`
}

Destination describes the destination spec of the traceflow.

func (*Destination) DeepCopy

func (in *Destination) DeepCopy() *Destination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination.

func (*Destination) DeepCopyInto

func (in *Destination) DeepCopyInto(out *Destination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ICMPEchoRequestHeader

type ICMPEchoRequestHeader struct {
	// ID is the ICMPEchoRequestHeader ID.
	ID int32 `json:"id,omitempty"`
	// Sequence is the ICMPEchoRequestHeader sequence.
	Sequence int32 `json:"sequence,omitempty"`
}

ICMPEchoRequestHeader describes spec of an ICMP echo request header.

func (*ICMPEchoRequestHeader) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPEchoRequestHeader.

func (*ICMPEchoRequestHeader) DeepCopyInto

func (in *ICMPEchoRequestHeader) DeepCopyInto(out *ICMPEchoRequestHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IPHeader

type IPHeader struct {
	// SrcIP is the source IP.
	SrcIP string `json:"srcIP,omitempty"`
	// Protocol is the IP protocol.
	Protocol int32 `json:"protocol,omitempty"`
	// TTL is the IP TTL.
	TTL int32 `json:"ttl,omitempty"`
	// Flags is the flags for IP.
	Flags int32 `json:"flags,omitempty"`
}

IPHeader describes spec of an IPv4 header. IPv6 not supported yet.

func (*IPHeader) DeepCopy

func (in *IPHeader) DeepCopy() *IPHeader

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPHeader.

func (*IPHeader) DeepCopyInto

func (in *IPHeader) DeepCopyInto(out *IPHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeResult

type NodeResult struct {
	// Node is the node of the observation.
	Node string `json:"node,omitempty" yaml:"node,omitempty"`
	// Role of the node like sender, receiver, etc.
	Role string `json:"role,omitempty" yaml:"role,omitempty"`
	// Timestamp is the timestamp of the observations on the node.
	Timestamp int64 `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
	// Observations includes all observations from sender nodes, receiver ones, etc.
	Observations []Observation `json:"observations,omitempty" yaml:"observations,omitempty"`
}

func (*NodeResult) DeepCopy

func (in *NodeResult) DeepCopy() *NodeResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResult.

func (*NodeResult) DeepCopyInto

func (in *NodeResult) DeepCopyInto(out *NodeResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Observation

type Observation struct {
	// Component is the observation component.
	Component TraceflowComponent `json:"component,omitempty" yaml:"component,omitempty"`
	// ComponentInfo is the extension of Component field.
	ComponentInfo string `json:"componentInfo,omitempty" yaml:"componentInfo,omitempty"`
	// Action is the action to the observation.
	Action TraceflowAction `json:"action,omitempty" yaml:"action,omitempty"`
	// Pod is the combination of Pod name and Pod Namespace.
	Pod string `json:"pod,omitempty" yaml:"pod,omitempty"`
	// DstMAC is the destination MAC.
	DstMAC string `json:"dstMAC,omitempty" yaml:"dstMAC,omitempty"`
	// NetworkPolicy is the combination of Namespace and NetworkPolicyName.
	NetworkPolicy string `json:"networkPolicy,omitempty" yaml:"networkPolicy,omitempty"`
	// TTL is the observation TTL.
	TTL int32 `json:"ttl,omitempty" yaml:"ttl,omitempty"`
	// TranslatedSrcIP is the translated source IP.
	TranslatedSrcIP string `json:"translatedSrcIP,omitempty" yaml:"translatedSrcIP,omitempty"`
	// TranslatedSrcIP is the translated destination IP.
	TranslatedDstIP string `json:"translatedDstIP,omitempty" yaml:"translatedDstIP,omitempty"`
	// TunnelDstIP is the tunnel destination IP.
	TunnelDstIP string `json:"tunnelDstIP,omitempty" yaml:"tunnelDstIP,omitempty"`
}

Observation describes those from sender nodes or receiver nodes.

func (*Observation) DeepCopy

func (in *Observation) DeepCopy() *Observation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Observation.

func (*Observation) DeepCopyInto

func (in *Observation) DeepCopyInto(out *Observation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Packet

type Packet struct {
	IPHeader        IPHeader        `json:"ipHeader,omitempty"`
	TransportHeader TransportHeader `json:"transportHeader,omitempty"`
}

Packet includes header info.

func (*Packet) DeepCopy

func (in *Packet) DeepCopy() *Packet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Packet.

func (*Packet) DeepCopyInto

func (in *Packet) DeepCopyInto(out *Packet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Source

type Source struct {
	// Namespace is the source namespace.
	Namespace string `json:"namespace,omitempty"`
	// Pod is the source pod.
	Pod string `json:"pod,omitempty"`
}

Source describes the source spec of the traceflow.

func (*Source) DeepCopy

func (in *Source) DeepCopy() *Source

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source.

func (*Source) DeepCopyInto

func (in *Source) DeepCopyInto(out *Source)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPHeader

type TCPHeader struct {
	// SrcPort is the source port.
	SrcPort int32 `json:"srcPort,omitempty"`
	// DstPort is the destination port.
	DstPort int32 `json:"dstPort,omitempty"`
	// Flags are flags in the header.
	Flags int32 `json:"flags,omitempty"`
}

TCPHeader describes spec of a TCP header.

func (*TCPHeader) DeepCopy

func (in *TCPHeader) DeepCopy() *TCPHeader

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPHeader.

func (*TCPHeader) DeepCopyInto

func (in *TCPHeader) DeepCopyInto(out *TCPHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Traceflow

type Traceflow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TraceflowSpec   `json:"spec,omitempty"`
	Status TraceflowStatus `json:"status,omitempty"`
}

+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Traceflow) DeepCopy

func (in *Traceflow) DeepCopy() *Traceflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Traceflow.

func (*Traceflow) DeepCopyInto

func (in *Traceflow) DeepCopyInto(out *Traceflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Traceflow) DeepCopyObject

func (in *Traceflow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TraceflowAction

type TraceflowAction string
const (
	Delivered TraceflowAction = "Delivered"
	Received  TraceflowAction = "Received"
	Forwarded TraceflowAction = "Forwarded"
	Dropped   TraceflowAction = "Dropped"
)

type TraceflowComponent

type TraceflowComponent string
const (
	SpoofGuard    TraceflowComponent = "SpoofGuard"
	LB            TraceflowComponent = "LB"
	Routing       TraceflowComponent = "Routing"
	NetworkPolicy TraceflowComponent = "NetworkPolicy"
	Forwarding    TraceflowComponent = "Forwarding"
)

type TraceflowList

type TraceflowList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Traceflow `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*TraceflowList) DeepCopy

func (in *TraceflowList) DeepCopy() *TraceflowList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceflowList.

func (*TraceflowList) DeepCopyInto

func (in *TraceflowList) DeepCopyInto(out *TraceflowList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TraceflowList) DeepCopyObject

func (in *TraceflowList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TraceflowPhase

type TraceflowPhase string
const (
	Pending   TraceflowPhase = "Pending"
	Running   TraceflowPhase = "Running"
	Succeeded TraceflowPhase = "Succeeded"
	Failed    TraceflowPhase = "Failed"
)

type TraceflowSpec

type TraceflowSpec struct {
	Source      Source      `json:"source,omitempty"`
	Destination Destination `json:"destination,omitempty"`
	Packet      Packet      `json:"packet,omitempty"`
}

TraceflowSpec describes the spec of the traceflow.

func (*TraceflowSpec) DeepCopy

func (in *TraceflowSpec) DeepCopy() *TraceflowSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceflowSpec.

func (*TraceflowSpec) DeepCopyInto

func (in *TraceflowSpec) DeepCopyInto(out *TraceflowSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TraceflowStatus

type TraceflowStatus struct {
	// Phase is the Traceflow phase.
	Phase TraceflowPhase `json:"phase,omitempty"`
	// Reason is a message indicating the reason of the traceflow's current phase.
	Reason string `json:"reason,omitempty"`
	// DataplaneTag is a tag to identify a traceflow session across Nodes.
	DataplaneTag uint8 `json:"dataplaneTag,omitempty"`
	// Results is the collection of all observations on different nodes.
	Results []NodeResult `json:"results,omitempty"`
}

TraceflowStatus describes current status of the traceflow.

func (*TraceflowStatus) DeepCopy

func (in *TraceflowStatus) DeepCopy() *TraceflowStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceflowStatus.

func (*TraceflowStatus) DeepCopyInto

func (in *TraceflowStatus) DeepCopyInto(out *TraceflowStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TransportHeader

type TransportHeader struct {
	ICMP *ICMPEchoRequestHeader `json:"icmp,omitempty"`
	UDP  *UDPHeader             `json:"udp,omitempty"`
	TCP  *TCPHeader             `json:"tcp,omitempty"`
}

TransportHeader describes spec of a TransportHeader.

func (*TransportHeader) DeepCopy

func (in *TransportHeader) DeepCopy() *TransportHeader

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TransportHeader.

func (*TransportHeader) DeepCopyInto

func (in *TransportHeader) DeepCopyInto(out *TransportHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UDPHeader

type UDPHeader struct {
	// SrcPort is the source port.
	SrcPort int32 `json:"srcPort,omitempty"`
	// DstPort is the destination port.
	DstPort int32 `json:"dstPort,omitempty"`
}

UDPHeader describes spec of a UDP header.

func (*UDPHeader) DeepCopy

func (in *UDPHeader) DeepCopy() *UDPHeader

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPHeader.

func (*UDPHeader) DeepCopyInto

func (in *UDPHeader) DeepCopyInto(out *UDPHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL