Skip to content

Commit 531edf4

Browse files
authored
feat(support-bundle): add host certificate collector and analyzer (#1132)
1 parent f69ae77 commit 531edf4

17 files changed

+1080
-45
lines changed

config/crds/troubleshoot.sh_analyzers.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,55 @@ spec:
16711671
required:
16721672
- outcomes
16731673
type: object
1674+
certificatesCollection:
1675+
properties:
1676+
annotations:
1677+
additionalProperties:
1678+
type: string
1679+
type: object
1680+
checkName:
1681+
type: string
1682+
collectorName:
1683+
type: string
1684+
exclude:
1685+
type: BoolString
1686+
outcomes:
1687+
items:
1688+
properties:
1689+
fail:
1690+
properties:
1691+
message:
1692+
type: string
1693+
uri:
1694+
type: string
1695+
when:
1696+
type: string
1697+
type: object
1698+
pass:
1699+
properties:
1700+
message:
1701+
type: string
1702+
uri:
1703+
type: string
1704+
when:
1705+
type: string
1706+
type: object
1707+
warn:
1708+
properties:
1709+
message:
1710+
type: string
1711+
uri:
1712+
type: string
1713+
when:
1714+
type: string
1715+
type: object
1716+
type: object
1717+
type: array
1718+
strict:
1719+
type: BoolString
1720+
required:
1721+
- outcomes
1722+
type: object
16741723
cpu:
16751724
properties:
16761725
annotations:

config/crds/troubleshoot.sh_hostcollectors.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,55 @@ spec:
143143
required:
144144
- outcomes
145145
type: object
146+
certificatesCollection:
147+
properties:
148+
annotations:
149+
additionalProperties:
150+
type: string
151+
type: object
152+
checkName:
153+
type: string
154+
collectorName:
155+
type: string
156+
exclude:
157+
type: BoolString
158+
outcomes:
159+
items:
160+
properties:
161+
fail:
162+
properties:
163+
message:
164+
type: string
165+
uri:
166+
type: string
167+
when:
168+
type: string
169+
type: object
170+
pass:
171+
properties:
172+
message:
173+
type: string
174+
uri:
175+
type: string
176+
when:
177+
type: string
178+
type: object
179+
warn:
180+
properties:
181+
message:
182+
type: string
183+
uri:
184+
type: string
185+
when:
186+
type: string
187+
type: object
188+
type: object
189+
type: array
190+
strict:
191+
type: BoolString
192+
required:
193+
- outcomes
194+
type: object
146195
cpu:
147196
properties:
148197
annotations:
@@ -1002,6 +1051,19 @@ spec:
10021051
- certificatePath
10031052
- keyPath
10041053
type: object
1054+
certificatesCollection:
1055+
properties:
1056+
collectorName:
1057+
type: string
1058+
exclude:
1059+
type: BoolString
1060+
paths:
1061+
items:
1062+
type: string
1063+
type: array
1064+
required:
1065+
- paths
1066+
type: object
10051067
copy:
10061068
properties:
10071069
collectorName:

config/crds/troubleshoot.sh_hostpreflights.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,55 @@ spec:
143143
required:
144144
- outcomes
145145
type: object
146+
certificatesCollection:
147+
properties:
148+
annotations:
149+
additionalProperties:
150+
type: string
151+
type: object
152+
checkName:
153+
type: string
154+
collectorName:
155+
type: string
156+
exclude:
157+
type: BoolString
158+
outcomes:
159+
items:
160+
properties:
161+
fail:
162+
properties:
163+
message:
164+
type: string
165+
uri:
166+
type: string
167+
when:
168+
type: string
169+
type: object
170+
pass:
171+
properties:
172+
message:
173+
type: string
174+
uri:
175+
type: string
176+
when:
177+
type: string
178+
type: object
179+
warn:
180+
properties:
181+
message:
182+
type: string
183+
uri:
184+
type: string
185+
when:
186+
type: string
187+
type: object
188+
type: object
189+
type: array
190+
strict:
191+
type: BoolString
192+
required:
193+
- outcomes
194+
type: object
146195
cpu:
147196
properties:
148197
annotations:
@@ -1002,6 +1051,19 @@ spec:
10021051
- certificatePath
10031052
- keyPath
10041053
type: object
1054+
certificatesCollection:
1055+
properties:
1056+
collectorName:
1057+
type: string
1058+
exclude:
1059+
type: BoolString
1060+
paths:
1061+
items:
1062+
type: string
1063+
type: array
1064+
required:
1065+
- paths
1066+
type: object
10051067
copy:
10061068
properties:
10071069
collectorName:

config/crds/troubleshoot.sh_supportbundles.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10403,6 +10403,55 @@ spec:
1040310403
required:
1040410404
- outcomes
1040510405
type: object
10406+
certificatesCollection:
10407+
properties:
10408+
annotations:
10409+
additionalProperties:
10410+
type: string
10411+
type: object
10412+
checkName:
10413+
type: string
10414+
collectorName:
10415+
type: string
10416+
exclude:
10417+
type: BoolString
10418+
outcomes:
10419+
items:
10420+
properties:
10421+
fail:
10422+
properties:
10423+
message:
10424+
type: string
10425+
uri:
10426+
type: string
10427+
when:
10428+
type: string
10429+
type: object
10430+
pass:
10431+
properties:
10432+
message:
10433+
type: string
10434+
uri:
10435+
type: string
10436+
when:
10437+
type: string
10438+
type: object
10439+
warn:
10440+
properties:
10441+
message:
10442+
type: string
10443+
uri:
10444+
type: string
10445+
when:
10446+
type: string
10447+
type: object
10448+
type: object
10449+
type: array
10450+
strict:
10451+
type: BoolString
10452+
required:
10453+
- outcomes
10454+
type: object
1040610455
cpu:
1040710456
properties:
1040810457
annotations:
@@ -11262,6 +11311,19 @@ spec:
1126211311
- certificatePath
1126311312
- keyPath
1126411313
type: object
11314+
certificatesCollection:
11315+
properties:
11316+
collectorName:
11317+
type: string
11318+
exclude:
11319+
type: BoolString
11320+
paths:
11321+
items:
11322+
type: string
11323+
type: array
11324+
required:
11325+
- paths
11326+
type: object
1126511327
copy:
1126611328
properties:
1126711329
collectorName:

pkg/analyze/host_analyzer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ func GetHostAnalyzer(analyzer *troubleshootv1beta2.HostAnalyze) (HostAnalyzer, b
4444
return &AnalyzeHostFilesystemPerformance{analyzer.FilesystemPerformance}, true
4545
case analyzer.Certificate != nil:
4646
return &AnalyzeHostCertificate{analyzer.Certificate}, true
47+
case analyzer.CertificatesCollection != nil:
48+
return &AnalyzeHostCertificatesCollection{analyzer.CertificatesCollection}, true
4749
case analyzer.HostServices != nil:
4850
return &AnalyzeHostServices{analyzer.HostServices}, true
4951
case analyzer.HostOS != nil:

0 commit comments

Comments
 (0)