flux diff kustomization doesn't seem to ignore files correctly
Describe the bug
While using this command:
flux diff kustomization apps --path apps/dev
I get this error:
✗ failed to generate kustomization.yaml: failed to decode Kubernetes YAML from $HOME/$REPO/apps/dev/.sops.yaml: missing Resource metadata <nil> <nil>
I tried to use --ignore-paths with various patterns including: .sops.yaml **/.sops.yaml $PWD/apps/dev/.sops.yaml
But none of those worked. I was able to accomplish my task by deleting the .sops.yaml file then restoring it via git afterwards.
Steps to reproduce
Create a kustomization in a standard format, and include a .sops.yaml which should be normally ignored, and it doesn't.
Expected behavior
The file should be ignored and the diff should work.
Screenshots and recordings
No response
OS / Distro
macOS 14.4.1
Flux version
2.2.3, 2.3
Flux check
N/a
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I have exactly the same problem. No matter how I exclude the files that I want excluded, they are not ignored.
Hey @matheuscscp could you please look into this? Thanks
Just ran into this. Any update?
Not yet, sorry!
also run into this issue
(fikrimi) [fikrimi@crimson:flux|main *+%]$ cat .sourceignore
.gitlab
(fikrimi) [fikrimi@crimson:flux|main *+%]$ flux diff kustomization flux-system --path ./
✓ Kustomization diffing...
✗ failed to generate kustomization.yaml: failed to decode Kubernetes YAML from /--REDACTED--/flux/.gitlab/agents/prod/config.yaml: missing Resource metadata <nil> <nil>
Same here with a .gitlab-ci.yml file, tried:
- full local path
- **/.gitlab-ci.yml
- **/*.yml nothing is actually ignored, only deleting/commenting out code inside of the .gitlab-ci.yml file allows flux diff kustomization command to work
@dgunzy If you have the time and interest, could you please work on this one too?
@dgunzy If you have the time and interest, could you please work on this one too?
Yes! I can look at this in a couple days.