Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSON manifest files #275

Closed
JanRK opened this issue Sep 28, 2020 · 1 comment
Closed

Support JSON manifest files #275

JanRK opened this issue Sep 28, 2020 · 1 comment

Comments

@JanRK
Copy link

JanRK commented Sep 28, 2020

Stolen from fluxcd/flux#2755

Describe the bug
When deciding what files to pass to kubectl, gotk ignores .json files in its target repository/branch/path.

To Reproduce
Set up a cluster with gotk. Add a valid namespace manifest file such as the one below to the target git repo/branch/path and name it *.json

{
  "apiVersion": "v1",
  "kind": "Namespace",
  "metadata": {
    "namespace": "test-namespace"
  }
}

Expected behavior
Gotk should pick up this file and apply it to the cluster under management.

What actually happens
Gotk notices that the git repo has changed, but does not apply the json file. Just renaming the json file to yaml does not work either.

Additional notes
.yaml, .yml and .json files are all accepted by kubectl, and gotk should mirror this behaviour.

@stefanprodan
Copy link
Member

GOTK uses Kustomize for ordering, patching, labeling, etc. Kustomize only works with YAML files that's why we can't support JSON.

ybelleguic pushed a commit to ybelleguic/flux2 that referenced this issue Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants