Skip to content

Commit a3b7975

Browse files
authored
Update the preflight secret label to troubleshoot.sh/kind (#1204)
Partial-fix: #1070 Changes the default label for preflights to troubleshoot.sh/kind: preflight
1 parent 41cd7c2 commit a3b7975

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/preflight/read_specs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type documentMetadata struct {
3434
}
3535

3636
type documentMetadataLabels struct {
37-
TroubleshootKind string `yaml:"troubleshoot.io/kind,omitempty"`
37+
TroubleshootKind string `yaml:"troubleshoot.sh/kind,omitempty"`
3838
}
3939

4040
type documentData struct {
@@ -136,7 +136,7 @@ func (p *PreflightSpecs) Read(args []string) error {
136136
return types.NewExitCodeError(constants.EXIT_CODE_SPEC_ISSUES, errors.Wrap(err, "failed to parse yaml"))
137137
}
138138

139-
// We're going to look for either of "kind: Preflight" OR "kind: Secret" with the label "troubleshoot.io/kind: preflight"
139+
// We're going to look for either of "kind: Preflight" OR "kind: Secret" with the label "troubleshoot.sh/kind: preflight"
140140

141141
if parsedDocHead.Kind != "Preflight" && parsedDocHead.Kind != "Secret" {
142142
continue

testdata/preflightspec/troubleshoot_v1beta2_preflight_secret_gotest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
app.kubernetes.io/instance: "release-name"
1212
app.kubernetes.io/version: 0.62.1
1313
helm.sh/chart: "troubleshoot-0.1.0"
14-
troubleshoot.io/kind: preflight
14+
troubleshoot.sh/kind: preflight
1515
name: "release-name-preflight-config"
1616
data:
1717
preflight.yaml: CmFwaVZlcnNpb246IHRyb3VibGVzaG9vdC5zaC92MWJldGEyCmtpbmQ6IFByZWZsaWdodAptZXRhZGF0YToKICBuYW1lOiBwcmVmbGlnaHQtc2FtcGxlCnNwZWM6CiAgCiAgYW5hbHl6ZXJzOgogICAgLSBub2RlUmVzb3VyY2VzOgogICAgICAgIGNoZWNrTmFtZTogTm9kZSBDb3VudCBDaGVjawogICAgICAgIG91dGNvbWVzOgogICAgICAgICAgLSBmYWlsOgogICAgICAgICAgICAgIHdoZW46ICdjb3VudCgpIDwgMycKICAgICAgICAgICAgICBtZXNzYWdlOiBUaGUgY2x1c3RlciBuZWVkcyBhIG1pbmltdW0gb2YgMyBub2Rlcy4KICAgICAgICAgIC0gcGFzczoKICAgICAgICAgICAgICBtZXNzYWdlOiBUaGVyZSBhcmUgbm90IGVub3VnaCBub2RlcyB0byBydW4gdGhpcyBhcHBsaWNhdGlvbiAoMyBvciBtb3JlKQogICAgLSBjbHVzdGVyVmVyc2lvbjoKICAgICAgICBvdXRjb21lczoKICAgICAgICAgIC0gZmFpbDoKICAgICAgICAgICAgICB3aGVuOiAiPCAxLjE2LjAiCiAgICAgICAgICAgICAgbWVzc2FnZTogVGhlIGFwcGxpY2F0aW9uIHJlcXVpcmVzIGF0IGxlYXN0IEt1YmVybmV0ZXMgMS4xNi4wLCBhbmQgcmVjb21tZW5kcyAxLjE4LjAuCiAgICAgICAgICAgICAgdXJpOiBodHRwczovL2t1YmVybmV0ZXMuaW8KICAgICAgICAgIC0gd2FybjoKICAgICAgICAgICAgICB3aGVuOiAiPCAxLjE4LjAiCiAgICAgICAgICAgICAgbWVzc2FnZTogWW91ciBjbHVzdGVyIG1lZXRzIHRoZSBtaW5pbXVtIHZlcnNpb24gb2YgS3ViZXJuZXRlcywgYnV0IHdlIHJlY29tbWVuZCB5b3UgdXBkYXRlIHRvIDEuMTguMCBvciBsYXRlci4KICAgICAgICAgICAgICB1cmk6IGh0dHBzOi8va3ViZXJuZXRlcy5pbwogICAgICAgICAgLSBwYXNzOgogICAgICAgICAgICAgIG1lc3NhZ2U6IFlvdXIgY2x1c3RlciBtZWV0cyB0aGUgcmVjb21tZW5kZWQgYW5kIHJlcXVpcmVkIHZlcnNpb25zIG9mIEt1YmVybmV0ZXMuCiAgICA=

testdata/preflightspec/troubleshoot_v1beta2_preflight_secret_stringdata_gotest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
app.kubernetes.io/instance: "release-name"
1212
app.kubernetes.io/version: 0.62.1
1313
helm.sh/chart: "troubleshoot-0.1.0"
14-
troubleshoot.io/kind: preflight
14+
troubleshoot.sh/kind: preflight
1515
name: "release-name-preflight-config"
1616
stringData:
1717
preflight.yaml: |

0 commit comments

Comments
 (0)