Skip to content

Commit e2053a0

Browse files
authored
rename the troubleshoot label to "support-bundle" (#918)
1 parent 421cccf commit e2053a0

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

cmd/troubleshoot/cli/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ from a server that can be used to assist when troubleshooting a Kubernetes clust
4646
cmd.Flags().Bool("redact", true, "enable/disable default redactions")
4747
cmd.Flags().Bool("interactive", true, "enable/disable interactive mode")
4848
cmd.Flags().Bool("collect-without-permissions", true, "always generate a support bundle, even if it some require additional permissions")
49-
cmd.Flags().StringSliceP("selector", "l", []string{"troubleshoot.io/kind=supportbundle-spec"}, "selector to filter on for loading additional support bundle specs found in secrets within the cluster")
49+
cmd.Flags().StringSliceP("selector", "l", []string{"troubleshoot.io/kind=support-bundle"}, "selector to filter on for loading additional support bundle specs found in secrets within the cluster")
5050
cmd.Flags().Bool("load-cluster-specs", false, "enable/disable loading additional troubleshoot specs found within the cluster. required when no specs are provided on the command line")
5151
cmd.Flags().String("since-time", "", "force pod logs collectors to return logs after a specific date (RFC3339)")
5252
cmd.Flags().String("since", "", "force pod logs collectors to return logs newer than a relative duration like 5s, 2m, or 3h.")

docs/support-bundle.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ support-bundle [url] [flags]
3636
--redact enable/disable default redactions (default true)
3737
--redactors strings names of the additional redactors to use
3838
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
39-
-l, --selector strings selector to filter on for loading additional support bundle specs found in secrets within the cluster (default [troubleshoot.io/kind=supportbundle-spec])
39+
-l, --selector strings selector to filter on for loading additional support bundle specs found in secrets within the cluster (default [troubleshoot.io/kind=support-bundle])
4040
-s, --server string The address and port of the Kubernetes API server
4141
--since string force pod logs collectors to return logs newer than a relative duration like 5s, 2m, or 3h.
4242
--since-time string force pod logs collectors to return logs after a specific date (RFC3339)
@@ -47,7 +47,7 @@ support-bundle [url] [flags]
4747

4848
### SEE ALSO
4949

50-
* [support-bundle analyze](support-bundle_analyze.md) - analyze a support bundle
51-
* [support-bundle version](support-bundle_version.md) - Print the current version and exit
50+
* [support-bundle analyze](support-bundle_analyze.md) - analyze a support bundle
51+
* [support-bundle version](support-bundle_version.md) - Print the current version and exit
5252

5353
###### Auto generated by spf13/cobra on 21-Nov-2022

pkg/specs/configmaps_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Test_LoadFromConfigMapMatchingLabel(t *testing.T) {
3131
Name: "configmap",
3232
Namespace: "default",
3333
Labels: map[string]string{
34-
"troubleshoot.io/kind": "supportbundle-spec",
34+
"troubleshoot.io/kind": "support-bundle",
3535
},
3636
},
3737
Data: map[string]string{
@@ -44,7 +44,7 @@ spec:
4444
- runPod:
4545
name: "run-ping"
4646
namespace: default
47-
podSpec:
47+
podSpec:
4848
containers:
4949
- name: run-ping
5050
image: busybox:1
@@ -63,7 +63,7 @@ spec:
6363
- runPod:
6464
name: "run-ping"
6565
namespace: default
66-
podSpec:
66+
podSpec:
6767
containers:
6868
- name: run-ping
6969
image: busybox:1
@@ -79,7 +79,7 @@ spec:
7979
Name: "configmap",
8080
Namespace: "default",
8181
Labels: map[string]string{
82-
"troubleshoot.io/kind": "supportbundle-spec",
82+
"troubleshoot.io/kind": "support-bundle",
8383
},
8484
},
8585
Data: map[string]string{
@@ -92,7 +92,7 @@ spec:
9292
- runPod:
9393
name: "run-ping"
9494
namespace: default
95-
podSpec:
95+
podSpec:
9696
containers:
9797
- name: run-ping
9898
image: busybox:1
@@ -123,7 +123,7 @@ spec:
123123
- runPod:
124124
name: "run-ping"
125125
namespace: default
126-
podSpec:
126+
podSpec:
127127
containers:
128128
- name: run-ping
129129
image: busybox:1
@@ -199,7 +199,7 @@ spec:
199199
Name: "configmap",
200200
Namespace: "default",
201201
Labels: map[string]string{
202-
"troubleshoot.io/kind": "supportbundle-spec",
202+
"troubleshoot.io/kind": "support-bundle",
203203
},
204204
},
205205
Data: map[string]string{
@@ -217,7 +217,7 @@ spec:
217217
Name: "configmap-2",
218218
Namespace: "default",
219219
Labels: map[string]string{
220-
"troubleshoot.io/kind": "supportbundle-spec",
220+
"troubleshoot.io/kind": "support-bundle",
221221
},
222222
},
223223
Data: map[string]string{
@@ -256,7 +256,7 @@ spec:
256256
Name: "configmap",
257257
Namespace: "some-namespace",
258258
Labels: map[string]string{
259-
"troubleshoot.io/kind": "supportbundle-spec",
259+
"troubleshoot.io/kind": "support-bundle",
260260
},
261261
},
262262
Data: map[string]string{
@@ -274,7 +274,7 @@ spec:
274274
Name: "configmap-2",
275275
Namespace: "some-namespace-2",
276276
Labels: map[string]string{
277-
"troubleshoot.io/kind": "supportbundle-spec",
277+
"troubleshoot.io/kind": "support-bundle",
278278
},
279279
},
280280
Data: map[string]string{
@@ -313,7 +313,7 @@ spec:
313313
Name: "configmap",
314314
Namespace: "some-namespace",
315315
Labels: map[string]string{
316-
"troubleshoot.io/kind": "supportbundle-spec-wrong",
316+
"troubleshoot.io/kind": "support-bundle-wrong",
317317
},
318318
},
319319
Data: map[string]string{
@@ -331,7 +331,7 @@ spec:
331331
Name: "configmap-2",
332332
Namespace: "some-namespace-2",
333333
Labels: map[string]string{
334-
"troubleshoot.io/kind": "supportbundle-spec",
334+
"troubleshoot.io/kind": "support-bundle",
335335
},
336336
},
337337
Data: map[string]string{
@@ -364,7 +364,7 @@ spec:
364364
_, err := client.CoreV1().ConfigMaps(configmap.Namespace).Create(ctx, &configmap, metav1.CreateOptions{})
365365
require.NoError(t, err)
366366
}
367-
got, err := LoadFromConfigMapMatchingLabel(client, "troubleshoot.io/kind=supportbundle-spec", "", "support-bundle-spec")
367+
got, err := LoadFromConfigMapMatchingLabel(client, "troubleshoot.io/kind=support-bundle", "", "support-bundle-spec")
368368
if tt.wantErr {
369369
assert.Error(t, err)
370370
} else {
@@ -394,7 +394,7 @@ func TestUserProvidedNamespace_LoadFromConfigMapMatchingLabel(t *testing.T) {
394394
Name: "configmap",
395395
Namespace: "some-namespace",
396396
Labels: map[string]string{
397-
"troubleshoot.io/kind": "supportbundle-spec",
397+
"troubleshoot.io/kind": "support-bundle",
398398
},
399399
},
400400
Data: map[string]string{
@@ -432,7 +432,7 @@ spec:
432432
Name: "configmap",
433433
Namespace: "not-your-namespace",
434434
Labels: map[string]string{
435-
"troubleshoot.io/kind": "supportbundle-spec",
435+
"troubleshoot.io/kind": "support-bundle",
436436
},
437437
},
438438
Data: map[string]string{
@@ -460,7 +460,7 @@ spec:
460460
_, err := client.CoreV1().ConfigMaps(configmap.Namespace).Create(ctx, &configmap, metav1.CreateOptions{})
461461
require.NoError(t, err)
462462
}
463-
got, err := LoadFromConfigMapMatchingLabel(client, "troubleshoot.io/kind=supportbundle-spec", "some-namespace", "support-bundle-spec")
463+
got, err := LoadFromConfigMapMatchingLabel(client, "troubleshoot.io/kind=support-bundle", "some-namespace", "support-bundle-spec")
464464
if tt.wantErr {
465465
assert.Error(t, err)
466466
} else {
@@ -490,7 +490,7 @@ func TestRedactors_LoadFromConfigMapMatchingLabel(t *testing.T) {
490490
Name: "configmap",
491491
Namespace: "default",
492492
Labels: map[string]string{
493-
"troubleshoot.io/kind": "supportbundle-spec",
493+
"troubleshoot.io/kind": "support-bundle",
494494
},
495495
},
496496
Data: map[string]string{
@@ -532,7 +532,7 @@ spec:
532532
Name: "configmap",
533533
Namespace: "default",
534534
Labels: map[string]string{
535-
"troubleshoot.io/kind": "supportbundle-spec",
535+
"troubleshoot.io/kind": "support-bundle",
536536
},
537537
},
538538
Data: map[string]string{
@@ -562,7 +562,7 @@ spec:
562562
_, err := client.CoreV1().ConfigMaps(configmap.Namespace).Create(ctx, &configmap, metav1.CreateOptions{})
563563
require.NoError(t, err)
564564
}
565-
got, err := LoadFromConfigMapMatchingLabel(client, "troubleshoot.io/kind=supportbundle-spec", "", "redactor-spec")
565+
got, err := LoadFromConfigMapMatchingLabel(client, "troubleshoot.io/kind=support-bundle", "", "redactor-spec")
566566
if tt.wantErr {
567567
assert.Error(t, err)
568568
} else {

pkg/specs/secrets_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Test_LoadFromSecretMatchingLabel(t *testing.T) {
3131
Name: "secret",
3232
Namespace: "default",
3333
Labels: map[string]string{
34-
"troubleshoot.io/kind": "supportbundle-spec",
34+
"troubleshoot.io/kind": "support-bundle",
3535
},
3636
},
3737
Data: map[string][]byte{
@@ -44,7 +44,7 @@ spec:
4444
- runPod:
4545
name: "run-ping"
4646
namespace: default
47-
podSpec:
47+
podSpec:
4848
containers:
4949
- name: run-ping
5050
image: busybox:1
@@ -63,7 +63,7 @@ spec:
6363
- runPod:
6464
name: "run-ping"
6565
namespace: default
66-
podSpec:
66+
podSpec:
6767
containers:
6868
- name: run-ping
6969
image: busybox:1
@@ -79,7 +79,7 @@ spec:
7979
Name: "secret",
8080
Namespace: "default",
8181
Labels: map[string]string{
82-
"troubleshoot.io/kind": "supportbundle-spec",
82+
"troubleshoot.io/kind": "support-bundle",
8383
},
8484
},
8585
Data: map[string][]byte{
@@ -92,7 +92,7 @@ spec:
9292
- runPod:
9393
name: "run-ping"
9494
namespace: default
95-
podSpec:
95+
podSpec:
9696
containers:
9797
- name: run-ping
9898
image: busybox:1
@@ -123,7 +123,7 @@ spec:
123123
- runPod:
124124
name: "run-ping"
125125
namespace: default
126-
podSpec:
126+
podSpec:
127127
containers:
128128
- name: run-ping
129129
image: busybox:1
@@ -199,7 +199,7 @@ spec:
199199
Name: "secret",
200200
Namespace: "default",
201201
Labels: map[string]string{
202-
"troubleshoot.io/kind": "supportbundle-spec",
202+
"troubleshoot.io/kind": "support-bundle",
203203
},
204204
},
205205
Data: map[string][]byte{
@@ -217,7 +217,7 @@ spec:
217217
Name: "secret-2",
218218
Namespace: "default",
219219
Labels: map[string]string{
220-
"troubleshoot.io/kind": "supportbundle-spec",
220+
"troubleshoot.io/kind": "support-bundle",
221221
},
222222
},
223223
Data: map[string][]byte{
@@ -256,7 +256,7 @@ spec:
256256
Name: "secret",
257257
Namespace: "some-namespace",
258258
Labels: map[string]string{
259-
"troubleshoot.io/kind": "supportbundle-spec",
259+
"troubleshoot.io/kind": "support-bundle",
260260
},
261261
},
262262
Data: map[string][]byte{
@@ -274,7 +274,7 @@ spec:
274274
Name: "secret-2",
275275
Namespace: "some-namespace-2",
276276
Labels: map[string]string{
277-
"troubleshoot.io/kind": "supportbundle-spec",
277+
"troubleshoot.io/kind": "support-bundle",
278278
},
279279
},
280280
Data: map[string][]byte{
@@ -313,7 +313,7 @@ spec:
313313
Name: "secret",
314314
Namespace: "some-namespace",
315315
Labels: map[string]string{
316-
"troubleshoot.io/kind": "supportbundle-spec-wrong",
316+
"troubleshoot.io/kind": "support-bundle-wrong",
317317
},
318318
},
319319
Data: map[string][]byte{
@@ -331,7 +331,7 @@ spec:
331331
Name: "secret-2",
332332
Namespace: "some-namespace-2",
333333
Labels: map[string]string{
334-
"troubleshoot.io/kind": "supportbundle-spec",
334+
"troubleshoot.io/kind": "support-bundle",
335335
},
336336
},
337337
Data: map[string][]byte{
@@ -364,7 +364,7 @@ spec:
364364
_, err := client.CoreV1().Secrets(secret.Namespace).Create(ctx, &secret, metav1.CreateOptions{})
365365
require.NoError(t, err)
366366
}
367-
got, err := LoadFromSecretMatchingLabel(client, "troubleshoot.io/kind=supportbundle-spec", "", "support-bundle-spec")
367+
got, err := LoadFromSecretMatchingLabel(client, "troubleshoot.io/kind=support-bundle", "", "support-bundle-spec")
368368
if tt.wantErr {
369369
assert.Error(t, err)
370370
} else {
@@ -394,7 +394,7 @@ func TestUserProvidedNamespace_LoadFromSecretMatchingLabel(t *testing.T) {
394394
Name: "secret",
395395
Namespace: "some-namespace",
396396
Labels: map[string]string{
397-
"troubleshoot.io/kind": "supportbundle-spec",
397+
"troubleshoot.io/kind": "support-bundle",
398398
},
399399
},
400400
Data: map[string][]byte{
@@ -432,7 +432,7 @@ spec:
432432
Name: "secret",
433433
Namespace: "not-your-namespace",
434434
Labels: map[string]string{
435-
"troubleshoot.io/kind": "supportbundle-spec",
435+
"troubleshoot.io/kind": "support-bundle",
436436
},
437437
},
438438
Data: map[string][]byte{
@@ -460,7 +460,7 @@ spec:
460460
_, err := client.CoreV1().Secrets(secret.Namespace).Create(ctx, &secret, metav1.CreateOptions{})
461461
require.NoError(t, err)
462462
}
463-
got, err := LoadFromSecretMatchingLabel(client, "troubleshoot.io/kind=supportbundle-spec", "some-namespace", "support-bundle-spec")
463+
got, err := LoadFromSecretMatchingLabel(client, "troubleshoot.io/kind=support-bundle", "some-namespace", "support-bundle-spec")
464464
if tt.wantErr {
465465
assert.Error(t, err)
466466
} else {
@@ -490,7 +490,7 @@ func TestRedactors_LoadFromSecretMatchingLabel(t *testing.T) {
490490
Name: "secret",
491491
Namespace: "default",
492492
Labels: map[string]string{
493-
"troubleshoot.io/kind": "supportbundle-spec",
493+
"troubleshoot.io/kind": "support-bundle",
494494
},
495495
},
496496
Data: map[string][]byte{
@@ -532,7 +532,7 @@ spec:
532532
Name: "secret",
533533
Namespace: "default",
534534
Labels: map[string]string{
535-
"troubleshoot.io/kind": "supportbundle-spec",
535+
"troubleshoot.io/kind": "support-bundle",
536536
},
537537
},
538538
Data: map[string][]byte{
@@ -562,7 +562,7 @@ spec:
562562
_, err := client.CoreV1().Secrets(secret.Namespace).Create(ctx, &secret, metav1.CreateOptions{})
563563
require.NoError(t, err)
564564
}
565-
got, err := LoadFromSecretMatchingLabel(client, "troubleshoot.io/kind=supportbundle-spec", "", "redactor-spec")
565+
got, err := LoadFromSecretMatchingLabel(client, "troubleshoot.io/kind=support-bundle", "", "redactor-spec")
566566
if tt.wantErr {
567567
assert.Error(t, err)
568568
} else {

0 commit comments

Comments
 (0)