linkerd2/cli/cmd
Takumi Sue 77add64860
Remove extra three dashes from helm templates (#5628)
(Background information)
In our company we are checking the sops-encrypted Linkerd manifest into GitHub repository,
and I came across the following problem.

---

Three dashes mean the start of the YAML document (or the end of the
directive).
https://yaml.org/spec/1.2/spec.html#id2800132

If there are only comments between `---`, the document is empty.
Assume the file which include an empty document at the top of itself.

```yaml
---
# foo
---
apiVersion: v1
kind: Namespace
metadata:
  name: foo
---
# bar
---
apiVersion: v1
kind: Namespace
metadata:
  name: bar
```

When we encrypt and decrypt it with [sops](https://github.com/mozilla/sops), the empty document will be
converted to `{}`.

```yaml
{}
---
apiVersion: v1
kind: Namespace
metadata:
    name: foo
---
apiVersion: v1
kind: Namespace
metadata:
    name: bar
```

It is invalid as k8s manifest ([apiVersion not set, kind not set]).

```
error validating data: [apiVersion not set, kind not set]
```

---

I'm afraid that it's sops's problem (at least partly), but anyhow this modification is enough harmless I think.
Thank you.

Signed-off-by: Takumi Sue <u630868b@alumni.osaka-u.ac.jp>
2021-02-01 10:51:34 -05:00
..
testdata Remove extra three dashes from helm templates (#5628) 2021-02-01 10:51:34 -05:00
alpha.go Remove SMI-Metrics charts and commands (#4843) 2020-08-24 14:35:33 -07:00
check.go cli: add helm customization flags to core install (#5507) 2021-01-21 22:49:50 +05:30
check_test.go healthcheck: simplify Checker construction with a builder (#5475) 2021-01-06 14:32:39 -08:00
completion.go Fix CLI zsh completion (#5285) 2020-12-02 15:37:57 -05:00
completion_test.go Bump proxy-init to 1.2.0 (#3397) 2019-09-09 09:06:14 -07:00
diagnostics.go Bump k8s client-go to v0.19.2 (#5002) 2020-09-28 12:45:18 -05:00
doc.go Use linkerd-jaeger extension for control plane tracing (#5299) 2020-12-08 14:34:26 -08:00
endpoints.go Extract from public-api all the Prometheus dependencies, and moves things into a new viz component 'linkerd-metrics-api' (#5560) 2021-01-21 18:26:38 -05:00
endpoints_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
identity.go Detect default ns for metrics, identity, routes and profile subcommands (#5530) 2021-01-15 08:51:26 -05:00
inject.go viz: move sub-cmds using viz extension under viz cmd (#5485) 2021-01-13 12:11:25 +05:30
inject_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
inject_util.go Update `inject` to throw an error while injecting non-compliant pods (#4346) 2020-06-24 14:07:05 -05:00
install-cni-plugin.go extension: Add new jaeger binary (#5278) 2020-11-25 20:10:35 +05:30
install-cni-plugin_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
install-sp.go Add safe accessor for Global in linkerd-config (#5269) 2020-11-23 12:45:58 -08:00
install-sp_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
install.go cli: add helm customization flags to core install (#5507) 2021-01-21 22:49:50 +05:30
install_cni_helm_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
install_helm_test.go Helm template helpers cleanup (#5514) 2021-01-14 09:05:31 -05:00
install_test.go cli: add helm customization flags to core install (#5507) 2021-01-21 22:49:50 +05:30
main_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
metrics.go Fix `linkerd metrics` resource selector (#5567) 2021-01-21 11:57:27 -05:00
metrics_diagnostics_util.go Linkerd CLI command to get control plane diagnostics (#4050) 2020-02-24 09:09:54 -08:00
metrics_diagnostics_util_test.go Bump k8s client-go to v0.19.2 (#5002) 2020-09-28 12:45:18 -05:00
options.go cli: add helm customization flags to core install (#5507) 2021-01-21 22:49:50 +05:30
profile.go Detect default ns for metrics, identity, routes and profile subcommands (#5530) 2021-01-15 08:51:26 -05:00
profile_test.go Detect default ns for metrics, identity, routes and profile subcommands (#5530) 2021-01-15 08:51:26 -05:00
range_slice.go Enable mixed configuration of skip-[inbound|outbound]-ports (#3766) 2019-12-20 09:32:13 -05:00
range_slice_test.go Enable mixed configuration of skip-[inbound|outbound]-ports (#3766) 2019-12-20 09:32:13 -05:00
root.go Detect default ns for metrics, identity, routes and profile subcommands (#5530) 2021-01-15 08:51:26 -05:00
test_helper.go Refactor upgrade tests to remove use of golden files (#4860) 2020-08-11 09:22:29 -07:00
uninject.go Update Injection to use new linkerd-config.values (#5036) 2020-10-07 09:54:34 -07:00
uninject_test.go viz: add render golden tests (#5433) 2021-01-12 11:59:16 +05:30
uninstall.go Add jaeger uninstall command (#5353) 2020-12-14 15:48:44 -08:00
upgrade.go cli: add helm customization flags to core install (#5507) 2021-01-21 22:49:50 +05:30
upgrade_legacy.go viz: move some components into linkerd-viz (#5340) 2020-12-23 20:17:31 +05:30
upgrade_test.go cli: add helm customization flags to core install (#5507) 2021-01-21 22:49:50 +05:30
version.go Extract from public-api all the Prometheus dependencies, and moves things into a new viz component 'linkerd-metrics-api' (#5560) 2021-01-21 18:26:38 -05:00
version_test.go Extract from public-api all the Prometheus dependencies, and moves things into a new viz component 'linkerd-metrics-api' (#5560) 2021-01-21 18:26:38 -05:00