Commit Graph

44 Commits

Author SHA1 Message Date
Somtochi Onyekwere 0f58d251e9 increase timeout
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-11-30 14:29:35 +01:00
Somtochi Onyekwere 211fbaacb1 use bitnami oci chart for minio
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-11-30 14:26:25 +01:00
Sunny cf3735e2a2 Static helmrepository OCI
Remove the HelmRepositoryOCI reconciler and make HelmRepository of type
OCI static. The existing HelmRepository OCI objects are migrated to
static object by removing their finalizers and status. New
HelmRepository OCI objects go through one time migration to remove the
status. These are not reconciled again, unless the type is changed to
default. On type switching from HelmRepository default to OCI, the
finalizer, status and artifact are removed to make the object static. On
switching from OCI to default, a complete reconciliation of
HelmRepository takes place to build artifact and add status and
finalizer.

The HelmRepository .spec.url has a new validation to check the URL
scheme. This is to add some validation to HelmRepository OCI since it's
not backed by a reconciler for full validation.

Add HelmRepositoryOCIMigrationPredicate predicate to detect and allow
reconciliation of HelmRepository OCI objects that need migration. The
other predicates that filtered the HelmRepository events based on the
type have been removed as all the HelmRepositories will now be
reconciled by a single reconciler. HelmRepositoryOCIMigrationPredicate
readily allows non-OCI objects and only checks if a migration is needed
for OCI type object.

Add controller tests for different migration scenarios.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-11-22 21:05:51 +05:30
Sunny e16d6ebde8 Move controllers to internal/controller
Make the controller implementations private.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-05-03 15:35:45 +05:30
Hidde Beydals f65e26173e
api: improve validation rules and omitempty nits
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 00:00:06 +02:00
Hidde Beydals 8fcfde9882
api-docs: fix external link source for v1.Artifact
Plus a switch from `godoc.org` -> `pkg.go.dev`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-28 16:57:48 +02:00
Stefan Prodan d90598583c
docs: Add GitRepository v1 docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-27 19:09:19 +03:00
Paulo Gomes 2d65cf4f24
build: Remove unused scripts
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-12 15:34:30 +00:00
Paulo Gomes 5ffa6a5a68
libgit2: Remove references to libgit2 from code
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-12 15:34:28 +00:00
Sanskar Jaiswal 9ef6316d73
ci: remove explicit managed transport init and tests
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-10-26 14:04:01 +01:00
Soule BA 0e97547eeb
implement Cosign verification for HelmCharts
If implemented, users will be able to enable chart verification for OCI
based helm charts.

Signed-off-by: Soule BA <soule@weave.works>
2022-10-21 10:00:08 +02:00
Paulo Gomes 6c06f4e222
The libgit2 libraries are downloaded and verified before
some of the make targets are executed. This assures the
provenance of such files before using them and is very
important specially for end users running such tests on
their machines.

Note that has been disabled specially due to recent issues
we experienced at CI which can be seen in:
fluxcd/source-controller#899

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-29 07:01:36 +01:00
Furkan 697f260dba
Introduce Initial OCIRepository Source Verification
Fixes #863

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
Co-authored-by: Batuhan <batuhan.apaydin@trendyol.com>
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2022-09-20 14:07:10 +03:00
Stefan Prodan 1ff0a20a0e
Fix build by enabling Cosign experimental
Cosign 1.12.0 comes with a breaking change where verify blob requires `COSIGN_EXPERIMENTAL=1`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-15 18:06:57 +03:00
Max Jonas Werner 64c1b065a8
allow for charts from OCI registries to specify a chart path
This change allows for a HelmRepository to point to e.g. "ghcr.io" and
then a HelmRelease pointing to the chart "stefanprodan/charts/podinfo"
in its `.spec.chart.spec.chart` field.

Related discussion: https://github.com/fluxcd/flux2/discussions/2959

Signed-off-by: Max Jonas Werner <max@e13.dev>
2022-08-08 15:44:43 +02:00
Stefan Prodan 07466730c0
Implement OCIRepository controller for public repos
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:06 +03:00
Paulo Gomes f51f9d3305
Remove MUSL and enable threadless libgit2 support
Use of MUSL was a temporary solution to mitigate cross-platform
issues while building openssl and libssh2. Since Unmanaged transport has
been deprecated, openssl and libssh2 dependencies are no longer required
and by extension MUSL.

Enables libgit2 threadless support and provides a regression assurance
for fluxcd/image-automation-controller#339.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-31 18:38:27 +01:00
Sanskar Jaiswal 536bacbea3 libgit2: upgrade to golang-with-libgit2 v0.1.4
Upgrade to golang-with-libgit2 v0.1.4 and use libgit2 which is compiled
without being linked to libssh2 and openssl.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-07-26 15:10:29 +05:30
Paulo Gomes afd02d3cfc
build: provenance and tampering checks for libgit2
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-13 10:10:42 +01:00
Max Jonas Werner 841ed7ae66
[RFC 0002] Flux OCI support for Helm (#690)
* Add OCI Helm support

* users will be able to declare OCI HelmRepository by using the `.spec.type` field of the HelmRepository API. Contrary to the HTTP/S HelmRepository no index.yaml is reconciled from source, instead a simple url and credentials validation is performed.
* For backwards-compatibility, an empty `.spec.type` field leads to the HelmRepository being treated as a plain old HTTP Helm repository.
* users will be able to declare the new OCI HelmRepository type as source using the .Spec.SourceRef field of the HelmChart API. This will result in reconciling a chart from an OCI repository.
* Add registryTestServer in the test suite and OCI HelmRepository test case
* Add a new OCI chart repository type that manage tags and charts from an OCI registry.
* Adapat RemoteBuilder to accept both repository types
* discard output from OCI registry client; The client has no way to set a verbosity level and spamming the controller logs with "Login succeeded" every time the object is reconciled doesn't help much.

Signed-off-by: Soule BA <soule@weave.works>
Signed-off-by: Max Jonas Werner <mail@makk.es>
Co-authored-by: Soule BA <soule@weave.works>
2022-05-19 14:50:16 +02:00
Paulo Gomes a000d8b859
Add tests for experimental libgit2 transport
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-16 16:22:21 +05:30
Sunny cc1e48243d Introduce v1beta2 API package
This commit introduces a v1beta2 API package for the staged breaking
changes around conditions and general usage of the API objects.

Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Co-authored-by: Hidde Beydals <hello@hidde.co>
2022-02-23 12:34:35 +01:00
Paulo Gomes 8429708997
Upgrade libgit2 to libgit2-1.3.0-2
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-16 11:39:11 +00:00
Paulo Gomes 80e1d243e6
Upgrade to libgit2-1.1.1-6
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-08 10:51:20 +00:00
Paulo Gomes 60c98b5471
Update libgit2 to 1.1.1-6
Fix issues developing in amd64, arm64 and apple silicon

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-07 13:00:57 +00:00
Paulo Gomes 62928217a0
Optimise cross compilation time
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-07 13:00:56 +00:00
Paulo Gomes 990b4a361b
Use static libraries from built image
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-07 13:00:55 +00:00
Paulo Gomes 1c06b3f0c0
Set timeout to fix intermittent errors
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-20 08:23:43 +00:00
Paulo Gomes ab934579bb
Bump libgit2 dependencies to debian bookworm
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:15 +00:00
Paulo Gomes 7abe7591f4
Add make verify
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:10 +00:00
Paulo Gomes e47739353c
Add curl timeout for attributions
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:08 +00:00
Paulo Gomes 42e4455100
Make Attributions markdown friendly
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:07 +00:00
Paulo Gomes f6029ab0f6
Set MINIO tag that supports arm64
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:06 +00:00
Paulo Gomes 7608449c3b
Add arm64 test ci tests
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:06 +00:00
Paulo Gomes a76cef6bde
Extract e2e tests from github actions
Enable users to run the exact same tests locally as they would be executed
as part of their PRs.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:05 +00:00
Paulo Gomes 6ab959d6fb
Add copyright attributions
Adds an initial ATTRIBUTIONS.md file containing the open source
components that source-controller depends on, and their copyright
information.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-13 10:16:03 +00:00
Stefan Prodan 058a016a60 Add ACL optional field to Source API
Cherry-picked from 525be388ec.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 11:41:55 +01:00
Hidde Beydals 0b4586253c Add LastHandledReconcileAt to source statuses
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-19 13:21:59 +01:00
Aurel Canciu b80f450b68
Switch to new pkg/apis/meta SetResourceCondition
Use SetResourceCondition as a generic method to set conditions for CRs,
implmeneting the ObjectWithStatusConditions interface used as input
type.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 13:08:33 +02:00
Aurel Canciu 00bb853d0e
Refactor to adopt k8s standardized Condition type
Updates to use metav1.Condition type and removes references for
deprecated corev1.Condition* constants and uses the new k8s api/meta
helpers in place of the old pkg/apis/meta types.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-19 13:08:33 +02:00
Hidde Beydals 582c2092b6 Change copyright to Flux authors
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-10-27 17:54:22 +01:00
Hidde Beydals 431ea05427 Implement `fluxcd/pkg/meta/api` in APIs 2020-09-30 10:18:43 +02:00
Hidde Beydals 7e647a6bb2 Generate API documentation 2020-06-19 16:45:05 +02:00
stefanprodan 92b7b1fe43 Scaffold repository controllers 2020-04-05 12:34:29 +03:00