docs: clarify that .spec.ignore extends defaults rather than overriding#2041
Open
alliasgher wants to merge 1 commit intofluxcd:mainfrom
Open
docs: clarify that .spec.ignore extends defaults rather than overriding#2041alliasgher wants to merge 1 commit intofluxcd:mainfrom
alliasgher wants to merge 1 commit intofluxcd:mainfrom
Conversation
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
39d28f7 to
6ef75fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both the v1 API godoc and the v1 spec docs say that
.spec.ignoreoverrides the default exclusion list, but the controller actually appends the spec patterns to the defaults (seegitrepository_controller.go:887,ocirepository_controller.go:1163,bucket_controller.go:708). Settingspec.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 overrides → extends. v1beta1/v1beta2 / v1alpha1 docs are deprecated and left untouched.
Fixes #429
Assisted-by: Claude/claude-opus-4-7