helmfile/pkg/app
KUOKA Yusuke a896f801ab
feat: optionally allow missing environment values/secrets files (#620)
```yaml
environments:
  default:
    missingFileHandler: Warn
    values:
    - path/to/values.yaml
    secrets:
    - path/to/secrets.yaml
```

`missingFileHandler` set to `Warn`, `Info`, or `Debug` results in helmfile NOT stop when `path/to/values.yaml` or `path/to/secrets.yaml` is missing.

Resolves #548

While implementing the above feature, I also found a bug that has been causing #559. This also fixes that.

To verify it is actually fixed, create an example helmfile.yaml that looks like the below, and run `helmfile diff`:

```
$ cat helmfile.yaml
environments:
  default:
    secrets:
      - env-secrets.yaml

releases:
  - name: myapp
    chart: nginx
    namespace: default
    secrets: [secrets.yaml]    # Notice this file does not exist
    values:
      - ingress:
          enabled: true

$ helmfile diff
could not deduce `environment:` block, configuring only .Environment.Name. error: failed to read helmfile.yaml.part.0: environment values file matching "env-secrets.yaml" does not exist
in ./helmfile.yaml: failed to read helmfile.yaml: environment values file matching "env-secrets.yaml" does not exist
```

Fixes #559
2019-05-28 15:33:45 +09:00
..
app.go feat: optionally allow missing environment values/secrets files (#620) 2019-05-28 15:33:45 +09:00
app_test.go feat: optionally allow missing environment values/secrets files (#620) 2019-05-28 15:33:45 +09:00
constants.go feat: "bases" for easier layerina 2019-05-13 21:48:00 +09:00
constants_test.go Various U/X improvements for `helmfile apply` (#586) 2019-05-12 16:26:11 +09:00
context.go feat: Opt-out dep-builds and repo-updates (#463) 2019-02-04 12:07:25 +09:00
desired_state_file_loader.go feat: optionally allow missing environment values/secrets files (#620) 2019-05-28 15:33:45 +09:00
errors.go feat: Opt-out dep-builds and repo-updates (#463) 2019-02-04 12:07:25 +09:00
two_pass_renderer.go fix: gotmpl layer was unable to reference env values from other layers when env!=default (#609) 2019-05-21 14:37:03 +09:00
two_pass_renderer_test.go feat: optionally allow missing environment values/secrets files (#620) 2019-05-28 15:33:45 +09:00