linkerd2/cli
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
..
cmd Remove extra three dashes from helm templates (#5628) 2021-02-01 10:51:34 -05:00
flag Add flag library (#5038) 2020-10-05 14:57:40 -07:00
installsp Make destination and identity services headless (#4923) 2020-09-02 14:53:38 -05:00
table Spelling (#4872) 2020-08-12 21:59:50 -07:00
Dockerfile-bin viz: move some components into linkerd-viz (#5340) 2020-12-23 20:17:31 +05:30
main.go Refactor proxy injection to use Helm charts (#3200) 2019-08-07 17:32:37 -05:00