The GitOps Toolkit source management component
Go to file
Hidde Beydals b5004a93bc Make Storage#Archive file filtering configurable
This commit makes the filtering applied during the archiving
configurable by introducing an optional `ArchiveFileFilter`
callback argument and a `SourceIgnoreFilter` implementation.

`SourceIgnoreFilter` filters out files matching
sourceignore.VCSPatterns and any of the provided patterns.
If an empty gitignore.Pattern slice is given, the matcher is set to
sourceignore.NewDefaultMatcher.

The `GitRepository` now loads the ignore patterns before archiving
the repository contents by calling `sourceignore.LoadIgnorePatterns`
and other helpers. The loading behavior is **breaking** as
`.sourceignore` files in the (subdirectories of the) repository are
now still taken into account if `spec.ignore` for a resource is
defined, overwriting is still possible by creating an overwriting
rule in the `spec.ignore` of the resource.

This change also makes it possible for the `BucketReconciler` to not
configure a callback at all and prevent looking for ignore
matches twice. To finalize the bucket refactor, a change to the
reconciler has been made to look for a `.sourceignore` file in
the root of the bucket to provide an additional way of configuring
(global) exclusions.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-13 15:34:20 +02:00
.github Add CodeQL scanning 2021-03-12 12:44:39 +02:00
api Add support for Git submodules with go-git 2021-03-30 13:00:13 +03:00
config Release v0.11.0 2021-03-31 17:42:40 +03:00
controllers Make Storage#Archive file filtering configurable 2021-04-13 15:34:20 +02:00
docs Add well-known CI configs to exclusion list 2021-03-31 14:39:12 +03:00
hack Add LastHandledReconcileAt to source statuses 2020-11-19 13:21:59 +01:00
internal Update chart tests 2021-02-23 14:19:56 +02:00
pkg Make Storage#Archive file filtering configurable 2021-04-13 15:34:20 +02:00
.gitignore ci: Add release workflow 2020-04-13 18:28:22 +03:00
CHANGELOG.md Release v0.11.0 2021-03-31 17:42:40 +03:00
CODE_OF_CONDUCT.md Add governance files like DCO, MAINTAINERS, CoC 2020-04-12 23:54:35 +02:00
CONTRIBUTING.md Document how to build libgit2 from source 2020-12-09 17:00:17 +01:00
DCO Add governance files like DCO, MAINTAINERS, CoC 2020-04-12 23:54:35 +02:00
Dockerfile Use musl and libgit2 packages from v3.13 branch 2021-02-10 22:28:14 +01:00
LICENSE Initial commit 2020-04-05 11:55:46 +03:00
MAINTAINERS Share maintainers from fluxcd/flux2 2020-12-01 12:20:27 +00:00
Makefile Update dependencies 2021-02-23 13:18:21 +02:00
PROJECT Promote API to v1beta1 2020-09-30 16:11:00 +03:00
README.md add CII badge 2021-04-08 12:13:56 +02:00
go.mod Make Storage#Archive file filtering configurable 2021-04-13 15:34:20 +02:00
go.sum Enable self-signed certs for go-git 2021-03-29 13:23:32 +03:00
main.go Change leader election ID to be more descriptive 2021-03-26 12:14:59 +01:00

README.md

Source controller

CII Best Practices e2e report license release

The source-controller is a Kubernetes operator, specialised in artifacts acquisition from external sources such as Git, Helm repositories and S3 buckets. The source-controller implements the source.toolkit.fluxcd.io API and is a core component of the GitOps toolkit.

overview

Features:

  • authenticates to sources (SSH, user/password, API token)
  • validates source authenticity (PGP)
  • detects source changes based on update policies (semver)
  • fetches resources on-demand and on-a-schedule
  • packages the fetched resources into a well-known format (tar.gz, yaml)
  • makes the artifacts addressable by their source identifier (sha, version, ts)
  • makes the artifacts available in-cluster to interested 3rd parties
  • notifies interested 3rd parties of source changes and availability (status conditions, events, hooks)
  • reacts to Git push and Helm chart upload events (via notification-controller)