helmfile/pkg/app
Danny Shemesh ceb108a24f
Fixed part splitting for CLRF separated files (#1265)
Fixes https://github.com/roboll/helmfile/issues/1142

desired_state_file_loader.go
- Will now normalize the content before splitting it to parts

context:
Me & and a fellow dev have tried to figure out why helmfile didn't fill in certain values on his machine; 
turns out, he'd mistakenly checked out our project w/ CRLF line endings, which had caused part splitting to not work (as it's hard coded to look for '\n').

The following was acted on as a single part, causing values from the bases not to be available in the next yaml part:

```
bases:\r\n
  - base.yaml\r\n
---\r\n

releases:
  - name: external-secrets-crd
    ... some templated yaml ...
```

I've thought about regex-ing it out instead of replace-all, but benchmarks had shown that a plain replace is faster.

I've also considered splitting by "\n---" instead of "\n---", but that would break if the dashes were to continue with some other text.
2020-05-19 10:04:12 +09:00
..
version feat: Persist Helmfile version in helmfile.lock for version compatibility check (#1016) 2019-12-11 09:19:18 +09:00
app.go Allow skipping chart-related operations when `installed: false` (#1233) 2020-05-09 14:03:56 +09:00
app_test.go Use namespace for release unicity with helm3 (#1213) (#1235) 2020-05-02 09:35:51 +09:00
ask.go feat: helmfile as a go library (#639) 2019-06-04 09:12:00 +09:00
config.go New output flag for list command (#1215) 2020-04-18 21:11:12 +09:00
constants.go feat: "bases" for easier layerina 2019-05-13 21:48:00 +09:00
constants_test.go Bump golang to v1.14.2 (#1132) 2020-04-21 09:06:29 +09:00
context.go Allow skipping chart-related operations when `installed: false` (#1233) 2020-05-09 14:03:56 +09:00
desired_state_file_loader.go Fixed part splitting for CLRF separated files (#1265) 2020-05-19 10:04:12 +09:00
destroy_test.go feat: `helmfile diff --detailed-exitcode` should also detect deletions (#1186) 2020-04-10 08:22:33 +09:00
diff_test.go feat: `helmfile diff --detailed-exitcode` should also detect deletions (#1186) 2020-04-10 08:22:33 +09:00
errors.go feat: Opt-out dep-builds and repo-updates (#463) 2019-02-04 12:07:25 +09:00
formatters.go New output flag for list command (#1215) 2020-04-18 21:11:12 +09:00
load_opts.go feat: `helmBinary` in helmfile.yaml (#1160) 2020-03-29 17:51:07 +09:00
mocks_test.go Use namespace for release unicity with helm3 (#1213) (#1235) 2020-05-02 09:35:51 +09:00
run.go feat: `helmfile diff --detailed-exitcode` should also detect deletions (#1186) 2020-04-10 08:22:33 +09:00
two_pass_renderer.go Fix: populate .Values regardless of prestate success (#1202) 2020-04-17 09:18:01 +09:00
two_pass_renderer_test.go Update documentation and tests for .Values (#839) 2019-09-14 05:35:16 +02:00