Skip to content

Commit 2b8e3fb

Browse files
authored
fix(collector): removed unused name in certificates collector (#1200)
1 parent 27c68a7 commit 2b8e3fb

9 files changed

+0
-21
lines changed

config/crds/troubleshoot.sh_collectors.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ spec:
9999
type: array
100100
exclude:
101101
type: BoolString
102-
name:
103-
type: string
104102
secrets:
105103
items:
106104
properties:

config/crds/troubleshoot.sh_preflights.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,8 +1594,6 @@ spec:
15941594
type: array
15951595
exclude:
15961596
type: BoolString
1597-
name:
1598-
type: string
15991597
secrets:
16001598
items:
16011599
properties:

config/crds/troubleshoot.sh_supportbundles.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,6 @@ spec:
16251625
type: array
16261626
exclude:
16271627
type: BoolString
1628-
name:
1629-
type: string
16301628
secrets:
16311629
items:
16321630
properties:

pkg/apis/troubleshoot/v1beta2/collector_shared.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ type RegistryImages struct {
218218

219219
type Certificates struct {
220220
CollectorMeta `json:",inline" yaml:",inline"`
221-
Name string `json:"name,omitempty" yaml:"name,omitempty"`
222221
Secrets []CertificateSource `json:"secrets,omitempty" yaml:"secrets,omitempty"`
223222
ConfigMaps []CertificateSource `json:"configMaps,omitempty" yaml:"configMaps,omitempty"`
224223
}

pkg/collect/certificates_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ func TestCertParser(t *testing.T) {
143143
CollectorMeta: troubleshootv1beta2.CollectorMeta{
144144
CollectorName: "collectorname",
145145
},
146-
Name: "expired certificate",
147146
Secrets: []troubleshootv1beta2.CertificateSource{
148147
{
149148
Name: "expiredCert",
@@ -183,7 +182,6 @@ func TestCertParser(t *testing.T) {
183182
CollectorMeta: troubleshootv1beta2.CollectorMeta{
184183
CollectorName: "collectorname",
185184
},
186-
Name: "multiple certificate",
187185
Secrets: []troubleshootv1beta2.CertificateSource{
188186
{
189187
Name: "multiCert",
@@ -232,7 +230,6 @@ func TestCertParser(t *testing.T) {
232230
CollectorMeta: troubleshootv1beta2.CollectorMeta{
233231
CollectorName: "collectorname",
234232
},
235-
Name: "valid certificate",
236233
Secrets: []troubleshootv1beta2.CertificateSource{
237234
{
238235
Name: "validCert",
@@ -277,7 +274,6 @@ func TestCertParser(t *testing.T) {
277274
CollectorMeta: troubleshootv1beta2.CollectorMeta{
278275
CollectorName: "collectorname",
279276
},
280-
Name: "non valid certificate",
281277
Secrets: []troubleshootv1beta2.CertificateSource{
282278
{
283279
Name: "nonCert",

pkg/collect/collector.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ func getCollectorName(c interface{}) string {
180180
name = v.Collector.Name
181181
case *CollectCertificates:
182182
collector = "certificates"
183-
name = v.Collector.Name
184183
default:
185184
collector = "<none>"
186185
}

schemas/collector-troubleshoot-v1beta2.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@
114114
"exclude": {
115115
"oneOf": [{"type": "string"},{"type": "boolean"}]
116116
},
117-
"name": {
118-
"type": "string"
119-
},
120117
"secrets": {
121118
"type": "array",
122119
"items": {

schemas/preflight-troubleshoot-v1beta2.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,9 +2417,6 @@
24172417
"exclude": {
24182418
"oneOf": [{"type": "string"},{"type": "boolean"}]
24192419
},
2420-
"name": {
2421-
"type": "string"
2422-
},
24232420
"secrets": {
24242421
"type": "array",
24252422
"items": {

schemas/supportbundle-troubleshoot-v1beta2.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,9 +2463,6 @@
24632463
"exclude": {
24642464
"oneOf": [{"type": "string"},{"type": "boolean"}]
24652465
},
2466-
"name": {
2467-
"type": "string"
2468-
},
24692466
"secrets": {
24702467
"type": "array",
24712468
"items": {

0 commit comments

Comments
 (0)