Fixed the Indent length for CronJob #137
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did I change:
Change CronJob indent to 12 .
detailed:
If I put args in the CronJob like below:
And run pkg/app/app_e2e_test.go, an error occurs:
app_e2e_test.go:58: Error Trace: /Users/yuewenchen/GolandProjects/helmify/pkg/app/app_e2e_test.go:58 Error: Received unexpected error: error converting YAML to JSON: yaml: line 17: did not find expected key unable to parse YAML helm.sh/helm/v3/pkg/lint/rules.validateYamlContent /Users/yuewenchen/go/pkg/mod/helm.sh/helm/v3@v3.11.2/pkg/lint/rules/template.go:212 helm.sh/helm/v3/pkg/lint/rules.Templates /Users/yuewenchen/go/pkg/mod/helm.sh/helm/v3@v3.11.2/pkg/lint/rules/template.go:146 helm.sh/helm/v3/pkg/lint.All /Users/yuewenchen/go/pkg/mod/helm.sh/helm/v3@v3.11.2/pkg/lint/lint.go:34 helm.sh/helm/v3/pkg/action.lintChart /Users/yuewenchen/go/pkg/mod/helm.sh/helm/v3@v3.11.2/pkg/action/lint.go:128 helm.sh/helm/v3/pkg/action.(*Lint).Run /Users/yuewenchen/go/pkg/mod/helm.sh/helm/v3@v3.11.2/pkg/action/lint.go:62 github.com/arttor/helmify/pkg/app.TestApp /Users/yuewenchen/GolandProjects/helmify/pkg/app/app_e2e_test.go:56 testing.tRunner /Users/yuewenchen/go/sdk/go1.21.1/src/testing/testing.go:1595 runtime.goexit /Users/yuewenchen/go/sdk/go1.21.1/src/runtime/asm_amd64.s:1650 Test: TestApp --- FAIL: TestApp (0.06s)If we checks the outputs of helm, we can see that the problem is caused by incorrect args indentation :