The GitOps Toolkit source management component
Go to file
Sunny 1a7adeb801 Fix helmrepo reconciler unfinished worker bug
Although all the APIs had interval as a required field, when tests
objects were created, they had the zero value of interval, which the API
server accepts. A zero interval value results in the test objects to
reconcile only once when they are created and never reconcile again
unless there's an update to the object. Most of the tests worked with
this behavior.

With HelmRepository removing the interval requirement and adding an
internal default, all the HelmRepository objects created in the tests
without any interval have a default interval value which results in
objects to reconcile automatically if they are not cleaned up after
running tests. TestHelmRepositoryReconciler_InMemoryCaching and
TestHelmChartReconciler_Reconcile create HelmRepository but doesn't
delete it at the end. This leads to a reconciliation of HelmRepository
outside of the test in the envtest environment. It just happened to be
that the reconciliation time matches with the end of test time. At the
end of the test run, the reconcilers receive shutdown signal and any
test server, like helmrepository server, are stopped. A HelmRepository
reconciliation triggered just before the shutdown signal gets stuck in
the reconciliation. HelmRepository can't download the index as the test
index server has stopped and hangs for some time. The HelmRepository
reconciler worker remains in active state, unlike other reconciler
workers that shut down, resulting in the test to timeout at the end.

The is fixed by deleting the HelmRepository object created in
TestHelmRepositoryReconciler_InMemoryCaching and
TestHelmChartReconciler_Reconcile at the end of the test similar to
other tests.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-11-22 21:05:57 +05:30
.github Build with Go 1.21 2023-11-20 17:20:08 +02:00
api optional interval and default timeout for helmrepo 2023-11-22 21:05:57 +05:30
config optional interval and default timeout for helmrepo 2023-11-22 21:05:57 +05:30
docs optional interval and default timeout for helmrepo 2023-11-22 21:05:57 +05:30
hack Static helmrepository OCI 2023-11-22 21:05:51 +05:30
internal Fix helmrepo reconciler unfinished worker bug 2023-11-22 21:05:57 +05:30
pkg Bucket: add prefix support for GCP 2023-10-17 15:10:33 +03:00
tests/fuzz Build with Go 1.21 2023-11-20 17:20:08 +02:00
.dockerignore libgit2: Remove references to libgit2 from code 2022-12-12 15:34:28 +00:00
.gitignore Update libgit2 to 1.1.1-6 2022-02-07 13:00:57 +00:00
.goreleaser.yaml Add SLSA3 generators to release workflow 2023-06-23 18:13:14 +03:00
CHANGELOG.md Add changelog entry for v1.1.2 2023-10-11 15:48:24 +02:00
CODE_OF_CONDUCT.md Add governance files like DCO, MAINTAINERS, CoC 2020-04-12 23:54:35 +02:00
DCO Add governance files like DCO, MAINTAINERS, CoC 2020-04-12 23:54:35 +02:00
DEVELOPMENT.md Build with Go 1.21 2023-11-20 17:20:08 +02:00
Dockerfile Update `tonistiigi/xx` to v1.3.0 2023-11-21 10:17:12 +02:00
LICENSE Initial commit 2020-04-05 11:55:46 +03:00
MAINTAINERS Paulo is Core Maintainer 2023-01-31 17:13:16 +01:00
Makefile Build with Go 1.21 2023-11-20 17:20:08 +02:00
PROJECT Add GitRepository v1 to project file 2023-03-28 12:30:11 +03:00
README.md Add API docs links to readme 2023-03-30 13:10:46 +03:00
go.mod build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 2023-11-22 08:44:48 +00:00
go.sum build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 2023-11-22 08:44:48 +00:00
main.go Static helmrepository OCI 2023-11-22 21:05:51 +05:30

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, OCI, Helm repositories and S3-compatible buckets. The source-controller implements the source.toolkit.fluxcd.io API and is a core component of the GitOps toolkit.

overview

APIs

Kind API Version
GitRepository source.toolkit.fluxcd.io/v1
OCIRepository source.toolkit.fluxcd.io/v1beta2
HelmRepository source.toolkit.fluxcd.io/v1beta2
HelmChart source.toolkit.fluxcd.io/v1beta2
Bucket source.toolkit.fluxcd.io/v1beta2

Features

  • authenticates to sources (SSH, user/password, API token, Workload Identity)
  • validates source authenticity (PGP, Cosign)
  • 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, Helm and OCI artifacts push events (via notification-controller)

Guides

Roadmap

The roadmap for the Flux family of projects can be found at https://fluxcd.io/roadmap/.

Contributing

This project is Apache 2.0 licensed and accepts contributions via GitHub pull requests. To start contributing please see the development guide.