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

Flux cli build kustomization ignores remote resources #4146

Closed
1 task done
adusumillipraveen opened this issue Aug 9, 2023 · 1 comment · Fixed by fluxcd/pkg#708
Closed
1 task done

Flux cli build kustomization ignores remote resources #4146

adusumillipraveen opened this issue Aug 9, 2023 · 1 comment · Fixed by fluxcd/pkg#708

Comments

@adusumillipraveen
Copy link

Describe the bug

We load CRDs to the repo like from a kustomization pointed in a flux kustomize .
Below command works fine when i try on 0.41.2 , but doesn't return anything on 2.0.1. I couldn't see any flags like load-restrictor in docs/code for cli commands. Couldn't trace what change would have caused this too, not sure if i have missed any docs

flux build kustomization traefik-crd --path ./apps/admin/traefik-crds --kustomization-file apps/admin/base/kustomize.yam

Steps to reproduce

  1. Install flux latest version
  2. Create a kustomization with remote files like kustomization pointed in a flux kustomize .
  3. Create a flux kustomization pointing to the directory like flux kustomize
  4. Run flux build kustomization traefik-crd --path ./apps/admin/traefik-crds --kustomization-file apps/admin/base/kustomize.yam
  5. Output will be empty

Expected behavior

  1. Output is expected to have output for kustomization with CRDs
  2. It works as expected in 0.41.x, but not in latest 2.x

Screenshots and recordings

No response

OS / Distro

Arch Linux

Flux version

v2.0.1

Flux check

flux check
► checking prerequisites
✗ flux 0.41.2 <2.0.1 (new version is available, please upgrade)
✔ Kubernetes 1.25.6 >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.35.0
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.0.1
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.0.0
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.0.1
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta2
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta2
✔ receivers.notification.toolkit.fluxcd.io/v1
✔ all checks passed

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@allenporter
Copy link
Contributor

allenporter commented Dec 16, 2023

I think this may have broken with #3763 when calling NewGeneratorWithIgnore. The problem is in fluxcd/pkg which ends up filtering out the resources in filterSlice which removes all urls from the resources.

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

Successfully merging a pull request may close this issue.

2 participants