Skip to content

docs: clarify that .spec.ignore extends defaults rather than overriding#2041

Open
alliasgher wants to merge 1 commit intofluxcd:mainfrom
alliasgher:docs-clarify-ignore-append
Open

docs: clarify that .spec.ignore extends defaults rather than overriding#2041
alliasgher wants to merge 1 commit intofluxcd:mainfrom
alliasgher:docs-clarify-ignore-append

Conversation

@alliasgher
Copy link
Copy Markdown

@alliasgher alliasgher commented Apr 25, 2026

Summary

Both the v1 API godoc and the v1 spec docs say that .spec.ignore overrides the default exclusion list, but the controller actually appends the spec patterns to the defaults (see gitrepository_controller.go:887, ocirepository_controller.go:1163, bucket_controller.go:708). Setting spec.ignore: ".git/" therefore still drops the rest of the default exclusions (.gitignore, .gitmodules, .gitattributes), which is extend semantics, not override.

This is the docs-only side of #429 (the issue's option 1). Behaviour is unchanged; just the wording in:

  • api/v1/{gitrepository,bucket,ocirepository}_types.go (godoc)
  • docs/api/v1/source.md (regenerated from the godoc)
  • docs/spec/v1/{gitrepositories,buckets,ocirepositories}.md (prose)

is updated from overridesextends. v1beta1/v1beta2 / v1alpha1 docs are deprecated and left untouched.

Fixes #429

Assisted-by: Claude/claude-opus-4-7

Both the v1 API godoc and the v1 spec docs say that .spec.ignore
'overrides' the default exclusion list, but the controller appends
spec.ignore to the default sourceignore patterns rather than replacing
them (see e.g. internal/controller/gitrepository_controller.go:887,
ocirepository_controller.go:1163, bucket_controller.go:708). Setting
spec.ignore: '.git/' therefore still drops the rest of the default
exclusions (.gitignore, .gitmodules, .gitattributes), which is
'extend' semantics, not 'override'.

Update the API godoc comments, regenerated docs/api/v1/source.md, and
the prose in docs/spec/v1/{gitrepositories,buckets,ocirepositories}.md
to say 'extends' instead of 'overrides'. No behaviour change.

Fixes fluxcd#429

Signed-off-by: alliasgher <alliasgher123@gmail.com>
Assisted-by: Claude/claude-opus-4-7
@alliasgher alliasgher force-pushed the docs-clarify-ignore-append branch from 39d28f7 to 6ef75fb Compare April 26, 2026 13:56
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 this pull request may close these issues.

GitRepository Ignore Behavior Does Not Match Documentation

1 participant