-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support JSON manifest files #2755
Comments
Flux doesn't support json, just yaml files. |
@2opremio I noticed :) Is there any underlying reason why that is? |
@bricef Flux needs to parse and modify Kubernetes manifests, for this reason only YAML is supported as the patching is done with a library specialised in YAML only. |
Ah, I mentioned it since you opened a bug and not a feature request. Legacy reasons. There isn't enough explicit community demand either (or they silently accept the status quo). It comes up from time to time but not enough to justify the effort, given the constrained manpower. |
Well, we maintain I guess that's the reason why the community prefers YAMLs too. |
@stefanprodan Valid JSON is also valid YAML, and can be parsed as such since YAML is a JSON superset. Kubeyaml should work with json files without issue. In fact, I just tried the underlying
This is a false limitation and should be fixed :) |
Should is subjective, but I will happily accept a PR. |
I'm not sure I would trust ruamel to output valid JSON given a JSON input. JSON-is-YAML works in your favour for the input, but not the output. |
Flux v1 is in maintenance mode now, and is not adding any new features unless they are critical. As Flux contrib efforts have been focused on Flux v2, the Flux project has moved to a new repo, fluxcd/flux2 In the interest of reducing the number of open issues not directly related to supporting Flux v1 in maintenance mode, and respecting you may have moved on already, I will go ahead and close out this issue for now. |
Describe the bug
When deciding what files to pass to kubectl, flux ignores
.json
files in its target repository/branch/path.To Reproduce
Set up a cluster with flux. Add a valid namespace manifest file such as the one below to the target git repo/branch/path and name it
*.json
Expected behavior
Flux should pick up this file and apply it to the cluster under management.
What actually happens
Flux notices that the git repo has changed, and re-runs kubectl, but omits the JSON file from the things it passes to kubectl's stdin.
Additional notes
.yaml
,.yml
and.json
files are all accepted by kubectl, and flux should mirror this behaviour.The text was updated successfully, but these errors were encountered: