Skip to content

Commit 92454fb

Browse files
hangyanluolanzonetnqnantoninbas
authored
Add PacketCapture CRD (#5443) (#6257)
API only, no controller yet Signed-off-by: Hang Yan <[email protected]> Co-authored-by: Lan <[email protected]> Co-authored-by: Quan Tian <[email protected]> Co-authored-by: Antonin Bas <[email protected]>
1 parent fe077f6 commit 92454fb

File tree

21 files changed

+2238
-0
lines changed

21 files changed

+2238
-0
lines changed
+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: packetcaptures.crd.antrea.io
5+
labels:
6+
app: antrea
7+
spec:
8+
group: crd.antrea.io
9+
versions:
10+
- name: v1alpha1
11+
served: true
12+
storage: true
13+
additionalPrinterColumns:
14+
- jsonPath: .spec.source.pod
15+
description: The name of the source Pod.
16+
name: Source-Pod
17+
type: string
18+
priority: 10
19+
- jsonPath: .spec.destination.pod
20+
description: The name of the destination Pod.
21+
name: Destination-Pod
22+
type: string
23+
priority: 10
24+
- jsonPath: .spec.source.ip
25+
description: The IP address of the source.
26+
name: Source-IP
27+
type: string
28+
priority: 10
29+
- jsonPath: .spec.destination.ip
30+
description: The IP address of the destination.
31+
name: Destination-IP
32+
type: string
33+
priority: 10
34+
- jsonPath: .spec.timeout
35+
description: Timeout in seconds.
36+
name: Timeout
37+
type: integer
38+
priority: 10
39+
- jsonPath: .metadata.creationTimestamp
40+
name: Age
41+
type: date
42+
schema:
43+
openAPIV3Schema:
44+
type: object
45+
required:
46+
- spec
47+
properties:
48+
spec:
49+
type: object
50+
required:
51+
- source
52+
- captureConfig
53+
- destination
54+
anyOf:
55+
- properties:
56+
source:
57+
required: [pod]
58+
- properties:
59+
destination:
60+
required: [pod]
61+
properties:
62+
source:
63+
type: object
64+
oneOf:
65+
- required:
66+
- pod
67+
- required:
68+
- ip
69+
properties:
70+
pod:
71+
type: object
72+
required:
73+
- name
74+
properties:
75+
namespace:
76+
type: string
77+
default: default
78+
name:
79+
type: string
80+
ip:
81+
type: string
82+
format: ipv4
83+
destination:
84+
type: object
85+
oneOf:
86+
- required:
87+
- pod
88+
- required:
89+
- ip
90+
properties:
91+
pod:
92+
type: object
93+
required:
94+
- name
95+
properties:
96+
namespace:
97+
type: string
98+
default: default
99+
name:
100+
type: string
101+
ip:
102+
type: string
103+
format: ipv4
104+
packet:
105+
type: object
106+
properties:
107+
ipFamily:
108+
type: string
109+
enum: [IPv4]
110+
default: IPv4
111+
protocol:
112+
x-kubernetes-int-or-string: true
113+
transportHeader:
114+
type: object
115+
properties:
116+
udp:
117+
type: object
118+
properties:
119+
srcPort:
120+
type: integer
121+
minimum: 1
122+
maximum: 65535
123+
dstPort:
124+
type: integer
125+
minimum: 1
126+
maximum: 65535
127+
tcp:
128+
type: object
129+
properties:
130+
srcPort:
131+
type: integer
132+
minimum: 1
133+
maximum: 65535
134+
dstPort:
135+
type: integer
136+
minimum: 1
137+
maximum: 65535
138+
139+
timeout:
140+
type: integer
141+
minimum: 1
142+
maximum: 300
143+
default: 60
144+
captureConfig:
145+
type: object
146+
oneOf:
147+
- required:
148+
- firstN
149+
properties:
150+
firstN:
151+
type: object
152+
required:
153+
- number
154+
properties:
155+
number:
156+
type: integer
157+
format: int32
158+
fileServer:
159+
type: object
160+
properties:
161+
url:
162+
type: string
163+
pattern: 's{0,1}ftps{0,1}:\/\/[\w-_./]+:\d+'
164+
status:
165+
type: object
166+
properties:
167+
numberCaptured:
168+
type: integer
169+
filePath:
170+
type: string
171+
conditions:
172+
type: array
173+
items:
174+
type: object
175+
properties:
176+
type:
177+
type: string
178+
status:
179+
type: string
180+
lastTransitionTime:
181+
type: string
182+
reason:
183+
type: string
184+
message:
185+
type: string
186+
subresources:
187+
status: {}
188+
scope: Cluster
189+
names:
190+
plural: packetcaptures
191+
singular: packetcapture
192+
kind: PacketCapture
193+
shortNames:
194+
- pcap

build/yamls/antrea-aks.yml

+197
Original file line numberDiff line numberDiff line change
@@ -2896,6 +2896,203 @@ spec:
28962896
shortNames:
28972897
- nlm
28982898

2899+
---
2900+
# Source: antrea/crds/packetcapture.yaml
2901+
apiVersion: apiextensions.k8s.io/v1
2902+
kind: CustomResourceDefinition
2903+
metadata:
2904+
name: packetcaptures.crd.antrea.io
2905+
labels:
2906+
app: antrea
2907+
spec:
2908+
group: crd.antrea.io
2909+
versions:
2910+
- name: v1alpha1
2911+
served: true
2912+
storage: true
2913+
additionalPrinterColumns:
2914+
- jsonPath: .spec.source.pod
2915+
description: The name of the source Pod.
2916+
name: Source-Pod
2917+
type: string
2918+
priority: 10
2919+
- jsonPath: .spec.destination.pod
2920+
description: The name of the destination Pod.
2921+
name: Destination-Pod
2922+
type: string
2923+
priority: 10
2924+
- jsonPath: .spec.source.ip
2925+
description: The IP address of the source.
2926+
name: Source-IP
2927+
type: string
2928+
priority: 10
2929+
- jsonPath: .spec.destination.ip
2930+
description: The IP address of the destination.
2931+
name: Destination-IP
2932+
type: string
2933+
priority: 10
2934+
- jsonPath: .spec.timeout
2935+
description: Timeout in seconds.
2936+
name: Timeout
2937+
type: integer
2938+
priority: 10
2939+
- jsonPath: .metadata.creationTimestamp
2940+
name: Age
2941+
type: date
2942+
schema:
2943+
openAPIV3Schema:
2944+
type: object
2945+
required:
2946+
- spec
2947+
properties:
2948+
spec:
2949+
type: object
2950+
required:
2951+
- source
2952+
- captureConfig
2953+
- destination
2954+
anyOf:
2955+
- properties:
2956+
source:
2957+
required: [pod]
2958+
- properties:
2959+
destination:
2960+
required: [pod]
2961+
properties:
2962+
source:
2963+
type: object
2964+
oneOf:
2965+
- required:
2966+
- pod
2967+
- required:
2968+
- ip
2969+
properties:
2970+
pod:
2971+
type: object
2972+
required:
2973+
- name
2974+
properties:
2975+
namespace:
2976+
type: string
2977+
default: default
2978+
name:
2979+
type: string
2980+
ip:
2981+
type: string
2982+
format: ipv4
2983+
destination:
2984+
type: object
2985+
oneOf:
2986+
- required:
2987+
- pod
2988+
- required:
2989+
- ip
2990+
properties:
2991+
pod:
2992+
type: object
2993+
required:
2994+
- name
2995+
properties:
2996+
namespace:
2997+
type: string
2998+
default: default
2999+
name:
3000+
type: string
3001+
ip:
3002+
type: string
3003+
format: ipv4
3004+
packet:
3005+
type: object
3006+
properties:
3007+
ipFamily:
3008+
type: string
3009+
enum: [IPv4]
3010+
default: IPv4
3011+
protocol:
3012+
x-kubernetes-int-or-string: true
3013+
transportHeader:
3014+
type: object
3015+
properties:
3016+
udp:
3017+
type: object
3018+
properties:
3019+
srcPort:
3020+
type: integer
3021+
minimum: 1
3022+
maximum: 65535
3023+
dstPort:
3024+
type: integer
3025+
minimum: 1
3026+
maximum: 65535
3027+
tcp:
3028+
type: object
3029+
properties:
3030+
srcPort:
3031+
type: integer
3032+
minimum: 1
3033+
maximum: 65535
3034+
dstPort:
3035+
type: integer
3036+
minimum: 1
3037+
maximum: 65535
3038+
3039+
timeout:
3040+
type: integer
3041+
minimum: 1
3042+
maximum: 300
3043+
default: 60
3044+
captureConfig:
3045+
type: object
3046+
oneOf:
3047+
- required:
3048+
- firstN
3049+
properties:
3050+
firstN:
3051+
type: object
3052+
required:
3053+
- number
3054+
properties:
3055+
number:
3056+
type: integer
3057+
format: int32
3058+
fileServer:
3059+
type: object
3060+
properties:
3061+
url:
3062+
type: string
3063+
pattern: 's{0,1}ftps{0,1}:\/\/[\w-_./]+:\d+'
3064+
status:
3065+
type: object
3066+
properties:
3067+
numberCaptured:
3068+
type: integer
3069+
filePath:
3070+
type: string
3071+
conditions:
3072+
type: array
3073+
items:
3074+
type: object
3075+
properties:
3076+
type:
3077+
type: string
3078+
status:
3079+
type: string
3080+
lastTransitionTime:
3081+
type: string
3082+
reason:
3083+
type: string
3084+
message:
3085+
type: string
3086+
subresources:
3087+
status: {}
3088+
scope: Cluster
3089+
names:
3090+
plural: packetcaptures
3091+
singular: packetcapture
3092+
kind: PacketCapture
3093+
shortNames:
3094+
- pcap
3095+
28993096
---
29003097
# Source: antrea/crds/supportbundlecollection.yaml
29013098
apiVersion: apiextensions.k8s.io/v1

0 commit comments

Comments
 (0)