Skip to content

Commit

Permalink
Add packetsampling feature
Browse files Browse the repository at this point in the history
Signed-off-by: Hang Yan <yhang@vmware.com>
  • Loading branch information
hangyan committed Jan 5, 2024
1 parent fd3bb75 commit 110f542
Show file tree
Hide file tree
Showing 43 changed files with 4,546 additions and 12 deletions.
180 changes: 180 additions & 0 deletions build/charts/antrea/crds/packetsampling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: packetsamplings.crd.antrea.io
labels:
app: antrea
spec:
group: crd.antrea.io
versions:
- name: v1alpha1
served: true
storage: true
additionalPrinterColumns:
- jsonPath: .status.phase
description: The phase of the Traceflow.
name: Phase
type: string
- jsonPath: .spec.source.pod
description: The name of the source Pod.
name: Source-Pod
type: string
priority: 10
- jsonPath: .spec.destination.pod
description: The name of the destination Pod.
name: Destination-Pod
type: string
priority: 10
- jsonPath: .spec.destination.ip
description: The IP address of the destination.
name: Destination-IP
type: string
priority: 10
- jsonPath: .spec.timeout
description: Timeout in seconds.
name: Timeout
type: integer
priority: 10
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
properties:
source:
type: object
properties:
pod:
type: string
namespace:
type: string
ip:
type: string
oneOf:
- format: ipv4
- format: ipv6
destination:
type: object
properties:
pod:
type: string
service:
type: string
namespace:
type: string
ip:
type: string
oneOf:
- format: ipv4
- format: ipv6
packet:
type: object
properties:
ipHeader:
type: object
properties:
srcIP:
type: string
oneOf:
- format: ipv4
- format: ipv6
protocol:
type: integer
ttl:
type: integer
flags:
type: integer
ipv6Header:
type: object
properties:
srcIP:
type: string
format: ipv6
nextHeader:
type: integer
hopLimit:
type: integer
transportHeader:
type: object
properties:
icmp:
type: object
properties:
id:
type: integer
sequence:
type: integer
udp:
type: object
properties:
srcPort:
type: integer
dstPort:
type: integer
tcp:
type: object
properties:
srcPort:
type: integer
dstPort:
type: integer
flags:
type: integer
timeout:
type: integer
type:
type: string
firstNSamplingConfig:
type: object
properties:
number:
type: integer
fileServer:
type: object
properties:
url:
type: string
authentication:
type: object
properties:
authType:
type: string
enum: [ "BearerToken", "APIKey", "BasicAuthentication" ]
authSecret:
type: object
properties:
name:
type: string
namespace:
type: string
status:
type: object
properties:
reason:
type: string
dataplaneTag:
type: integer
phase:
type: string
startTime:
type: string
numCapturedPackets:
type: integer
packetsPath:
type: string

subresources:
status: {}
scope: Cluster
names:
plural: packetsamplings
singular: packetsampling
kind: PacketSampling
shortNames:
- ps
13 changes: 13 additions & 0 deletions build/charts/antrea/templates/agent/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ rules:
- patch
- create
- delete
- apiGroups:
- crd.antrea.io
resources:
- packetsamplings
- packetsamplings/status
verbs:
- get
- watch
- list
- update
- patch
- create
- delete
- apiGroups:
- crd.antrea.io
resources:
Expand Down
13 changes: 13 additions & 0 deletions build/charts/antrea/templates/controller/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,19 @@ rules:
- patch
- create
- delete
- apiGroups:
- crd.antrea.io
resources:
- packetsamplings
- packetsamplings/status
verbs:
- get
- watch
- list
- update
- patch
- create
- delete
- apiGroups:
- crd.antrea.io
resources:
Expand Down
Loading

0 comments on commit 110f542

Please sign in to comment.