support yaml for providers.file.content
kind/enhancement
### Welcome!
- [x] Yes, I've searched similar issues on [GitHub](https://github.com/traefik/traefik/issues) and didn't find any.
- [x] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.
### What do you want to achieve with this Chart ?
It would be easier for me to lint/validate my file-provider config if it could be actual yaml instead of yaml-in-yaml-string (syntax highlighting and validation, etc.), i.e. instead of:
```yaml
file:
enabled: true
content: |
http:
middlewares:...
```
```yaml
file:
enabled: true
content:
http:
middlewares:...
```
Adding it to the configmap should be only a change from:
```
{{ content | toYaml | nindent 4 }}
```
to:
```
{{ content | toYaml | quote | nindent 4 }}
```
In order to be backward-compatible, we could do this as a new `contentYaml` or `contentData` field. Either that or a switch on the type of `content`, whichever is preferable.
Would a PR be welcome? And if so, any preference for adding a switch for the type of `content` or a sibling field?
1 条评论