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

Updating the spec.ignore field of a GitRepository has no effect #704

Closed
1 task done
angelokurtis opened this issue May 2, 2022 · 2 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@angelokurtis
Copy link

Describe the bug

When editing a GitRepository resource whose the spec.ignore field is already set the new ignored paths are not updated and the configuration has no effect.

Steps to reproduce

  1. Install Flux
  2. Create a GitRepository setting the spec.ignore field. eg:
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
  name: istio
spec:
  interval: 10s
  url: https://github.com/istio/istio
  ref:
    semver: ~1.13.3
  ignore: |
    # exclude all
    /*
    # include deploy dir
    !/manifests
  1. Check if the created resource is ready. eg:
❯ kubectl get gitrepository.source.toolkit.fluxcd.io/istio
NAME    URL                              AGE   READY   STATUS
istio   https://github.com/istio/istio   29m   True    stored artifact for revision '1.13.3/b28579cb30c12c428ea58279b7c06f3302abe924'
  1. Then, remove the spec.ignore field. eg:
❯ kubectl patch gitrepository.source.toolkit.fluxcd.io/istio --type='json' -p='[{"op":"remove","path":"/spec/ignore"}]'

Expected behavior

The generated artifact should be updated and the new tar.gz must contain all expected paths that were previously ignored.

Screenshots and recordings

No response

OS / Distro

Ubuntu 20.04

Flux version

v0.29.5

Flux check

► checking prerequisites
✔ Kubernetes 1.23.5 >=1.20.6-0
► checking controllers
✔ 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
@angelokurtis
Copy link
Author

I'm not sure if the PR #687 is still in progress, but I opened the PR #712 as a solution suggestion for this issue.

@pjbgf
Copy link
Member

pjbgf commented Jun 6, 2022

Fixed by #724 (581695b).

@pjbgf pjbgf closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants