Skip to content

Commit ad1a562

Browse files
authored
feat(hostpreflights): udp port status (#981)
* feat(hostpreflights): udp port status * fix(hostpreflights): tcpPortStatus -> udpPortStatus
1 parent cf4eed1 commit ad1a562

40 files changed

+1101
-26
lines changed

config/crds/troubleshoot.sh_analyzers.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,6 +2302,55 @@ spec:
23022302
required:
23032303
- outcomes
23042304
type: object
2305+
udpPortStatus:
2306+
properties:
2307+
annotations:
2308+
additionalProperties:
2309+
type: string
2310+
type: object
2311+
checkName:
2312+
type: string
2313+
collectorName:
2314+
type: string
2315+
exclude:
2316+
type: BoolString
2317+
outcomes:
2318+
items:
2319+
properties:
2320+
fail:
2321+
properties:
2322+
message:
2323+
type: string
2324+
uri:
2325+
type: string
2326+
when:
2327+
type: string
2328+
type: object
2329+
pass:
2330+
properties:
2331+
message:
2332+
type: string
2333+
uri:
2334+
type: string
2335+
when:
2336+
type: string
2337+
type: object
2338+
warn:
2339+
properties:
2340+
message:
2341+
type: string
2342+
uri:
2343+
type: string
2344+
when:
2345+
type: string
2346+
type: object
2347+
type: object
2348+
type: array
2349+
strict:
2350+
type: BoolString
2351+
required:
2352+
- outcomes
2353+
type: object
23052354
type: object
23062355
type: array
23072356
type: object

config/crds/troubleshoot.sh_hostcollectors.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,55 @@ spec:
879879
required:
880880
- outcomes
881881
type: object
882+
udpPortStatus:
883+
properties:
884+
annotations:
885+
additionalProperties:
886+
type: string
887+
type: object
888+
checkName:
889+
type: string
890+
collectorName:
891+
type: string
892+
exclude:
893+
type: BoolString
894+
outcomes:
895+
items:
896+
properties:
897+
fail:
898+
properties:
899+
message:
900+
type: string
901+
uri:
902+
type: string
903+
when:
904+
type: string
905+
type: object
906+
pass:
907+
properties:
908+
message:
909+
type: string
910+
uri:
911+
type: string
912+
when:
913+
type: string
914+
type: object
915+
warn:
916+
properties:
917+
message:
918+
type: string
919+
uri:
920+
type: string
921+
when:
922+
type: string
923+
type: object
924+
type: object
925+
type: array
926+
strict:
927+
type: BoolString
928+
required:
929+
- outcomes
930+
type: object
882931
type: object
883932
type: array
884933
collectors:
@@ -1244,6 +1293,19 @@ spec:
12441293
exclude:
12451294
type: BoolString
12461295
type: object
1296+
udpPortStatus:
1297+
properties:
1298+
collectorName:
1299+
type: string
1300+
exclude:
1301+
type: BoolString
1302+
interface:
1303+
type: string
1304+
port:
1305+
type: integer
1306+
required:
1307+
- port
1308+
type: object
12471309
type: object
12481310
type: array
12491311
type: object

config/crds/troubleshoot.sh_hostpreflights.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,55 @@ spec:
879879
required:
880880
- outcomes
881881
type: object
882+
udpPortStatus:
883+
properties:
884+
annotations:
885+
additionalProperties:
886+
type: string
887+
type: object
888+
checkName:
889+
type: string
890+
collectorName:
891+
type: string
892+
exclude:
893+
type: BoolString
894+
outcomes:
895+
items:
896+
properties:
897+
fail:
898+
properties:
899+
message:
900+
type: string
901+
uri:
902+
type: string
903+
when:
904+
type: string
905+
type: object
906+
pass:
907+
properties:
908+
message:
909+
type: string
910+
uri:
911+
type: string
912+
when:
913+
type: string
914+
type: object
915+
warn:
916+
properties:
917+
message:
918+
type: string
919+
uri:
920+
type: string
921+
when:
922+
type: string
923+
type: object
924+
type: object
925+
type: array
926+
strict:
927+
type: BoolString
928+
required:
929+
- outcomes
930+
type: object
882931
type: object
883932
type: array
884933
collectors:
@@ -1244,6 +1293,19 @@ spec:
12441293
exclude:
12451294
type: BoolString
12461295
type: object
1296+
udpPortStatus:
1297+
properties:
1298+
collectorName:
1299+
type: string
1300+
exclude:
1301+
type: BoolString
1302+
interface:
1303+
type: string
1304+
port:
1305+
type: integer
1306+
required:
1307+
- port
1308+
type: object
12471309
type: object
12481310
type: array
12491311
remoteCollectors:
@@ -1519,6 +1581,19 @@ spec:
15191581
exclude:
15201582
type: BoolString
15211583
type: object
1584+
udpPortStatus:
1585+
properties:
1586+
collectorName:
1587+
type: string
1588+
exclude:
1589+
type: BoolString
1590+
interface:
1591+
type: string
1592+
port:
1593+
type: integer
1594+
required:
1595+
- port
1596+
type: object
15221597
type: object
15231598
type: array
15241599
type: object

config/crds/troubleshoot.sh_preflights.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10162,6 +10162,19 @@ spec:
1016210162
exclude:
1016310163
type: BoolString
1016410164
type: object
10165+
udpPortStatus:
10166+
properties:
10167+
collectorName:
10168+
type: string
10169+
exclude:
10170+
type: BoolString
10171+
interface:
10172+
type: string
10173+
port:
10174+
type: integer
10175+
required:
10176+
- port
10177+
type: object
1016510178
type: object
1016610179
type: array
1016710180
uploadResultsTo:

config/crds/troubleshoot.sh_remotecollectors.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,19 @@ spec:
340340
exclude:
341341
type: BoolString
342342
type: object
343+
udpPortStatus:
344+
properties:
345+
collectorName:
346+
type: string
347+
exclude:
348+
type: BoolString
349+
interface:
350+
type: string
351+
port:
352+
type: integer
353+
required:
354+
- port
355+
type: object
343356
type: object
344357
type: array
345358
nodeSelector:

config/crds/troubleshoot.sh_supportbundles.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10763,6 +10763,55 @@ spec:
1076310763
required:
1076410764
- outcomes
1076510765
type: object
10766+
udpPortStatus:
10767+
properties:
10768+
annotations:
10769+
additionalProperties:
10770+
type: string
10771+
type: object
10772+
checkName:
10773+
type: string
10774+
collectorName:
10775+
type: string
10776+
exclude:
10777+
type: BoolString
10778+
outcomes:
10779+
items:
10780+
properties:
10781+
fail:
10782+
properties:
10783+
message:
10784+
type: string
10785+
uri:
10786+
type: string
10787+
when:
10788+
type: string
10789+
type: object
10790+
pass:
10791+
properties:
10792+
message:
10793+
type: string
10794+
uri:
10795+
type: string
10796+
when:
10797+
type: string
10798+
type: object
10799+
warn:
10800+
properties:
10801+
message:
10802+
type: string
10803+
uri:
10804+
type: string
10805+
when:
10806+
type: string
10807+
type: object
10808+
type: object
10809+
type: array
10810+
strict:
10811+
type: BoolString
10812+
required:
10813+
- outcomes
10814+
type: object
1076610815
type: object
1076710816
type: array
1076810817
hostCollectors:
@@ -11128,6 +11177,19 @@ spec:
1112811177
exclude:
1112911178
type: BoolString
1113011179
type: object
11180+
udpPortStatus:
11181+
properties:
11182+
collectorName:
11183+
type: string
11184+
exclude:
11185+
type: BoolString
11186+
interface:
11187+
type: string
11188+
port:
11189+
type: integer
11190+
required:
11191+
- port
11192+
type: object
1113111193
type: object
1113211194
type: array
1113311195
uri:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: troubleshoot.sh/v1beta2
2+
kind: HostCollector
3+
metadata:
4+
name: port
5+
spec:
6+
collectors:
7+
- udpPortStatus:
8+
collectorName: flannel
9+
port: 8472
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: troubleshoot.sh/v1beta2
2+
kind: HostCollector
3+
metadata:
4+
name: port
5+
spec:
6+
collectors:
7+
- udpPortStatus:
8+
collectorName: flannel
9+
port: 8472
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: troubleshoot.sh/v1beta2
2+
kind: HostPreflight
3+
metadata:
4+
name: port
5+
spec:
6+
collectors:
7+
- udpPortStatus:
8+
collectorName: flannel
9+
port: 8472
10+
analyzers:
11+
- udpPortStatus:
12+
collectorName: flannel
13+
outcomes:
14+
- fail:
15+
when: "address-in-use"
16+
message: Another process was already listening on port 8472.
17+
- fail:
18+
when: "error"
19+
message: Unexpected port status
20+
- pass:
21+
when: "connected"
22+
message: Port 8472 is open
23+
- warn:
24+
message: Unexpected port status

0 commit comments

Comments
 (0)