Documentation
¶
Overview ¶
Package sourceignore builds the file-exclusion matcher Flux's source-controller applies when it packages a GitRepository/OCIRepository artifact: its default patterns (.git/, .github/, *.jpg/png/zip, .sops.yaml, .flux.yaml, .goreleaser.yml, …) plus any in-tree .sourceignore files plus caller-supplied spec.ignore patterns.
It is a leaf package — it depends only on the vendored fluxcd/go-git ignore primitives, never on pkg/source or pkg/kustomize — so BOTH the source-fetch artifact filtering (pkg/source.ApplyIgnore) and the in-memory kustomize tree materialization (pkg/kustomize) can consume one matcher without an import cycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher reports whether a path within a source tree rooted at a fixed directory is excluded from the artifact. It is safe for concurrent reads.
func New ¶
New builds a Matcher for the tree rooted at root.
withDefaults adds Flux's default VCS + ExcludeExt/CI/Extra patterns — the GitRepository/OCIRepository behavior; pass false for the Bucket flavor (in-tree .sourceignore + extra only). extra, when non-empty, appends caller patterns (a source's spec.ignore).