Commit Graph

33 Commits

Author SHA1 Message Date
Matheus Pimenta 03a118a94c Add proxy support for OCIRepository API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-15 10:29:57 -03:00
Stefan Prodan 4eaedd54b8
Build with Go 1.23
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-15 09:52:45 +03:00
Matheus Pimenta 7536ab4b02 Add support for AWS STS endpoint in the Bucket API
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-08 16:35:01 +01:00
Stefan Prodan 827f579b14
Update dependencies to Go 1.22 and Kubernetes 1.29.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-04-02 16:52:10 +03:00
Stefan Prodan 2feec3198b
Build with Go 1.21
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-11-20 17:20:08 +02:00
Stefan Prodan 626611958a
Install Go 1.20 for oss-fuzz
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-26 18:40:43 +03:00
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
Paulo Gomes 69211171f8
libgit2: Remove libgit2 from fuzzers
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-12 15:34:29 +00:00
Paulo Gomes aff16b9f49
build: Link libgit2 via LIB_FUZZING_ENGINE
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-25 17:07:34 +00:00
Paulo Gomes 28f04a3ec0
build: Add postbuild script for fuzzing
In order to reduce the complexity of the fuzzing setup
the majority of the code is moving upstream. For that
to work, each project with specific requirements need
to configure pre and post build scripts to ensure
actions take place before the build, and any clean up
happens at the very end.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-24 19:12:58 +00:00
Paulo Gomes 04dd4b54fb
build: Migrate to Go Native fuzz and improve reliability
Establish conventions which aligns with what is supported upstream
today, whilst expanding on documentation to ensure folks have
pointers on how to debug/check for issues going forwards.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-24 09:56:38 +00:00
Paulo Gomes 22e8b0ff7e
Update dependencies
Given that pkg/* now depends on fluxcd/go-git, this changes also apply
the same changes here.

New versions:
- github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0.
- github.com/distribution/distribution/v3 v3.0.0-20221111170714-3b8fbf975279.
- github.com/fluxcd/pkg/apis/event v0.2.0.
- github.com/fluxcd/pkg/helmtestserver v0.10.0.
- github.com/fluxcd/pkg/oci v0.15.0.
- github.com/fluxcd/pkg/runtime v0.24.0.
- github.com/fluxcd/pkg/sourceignore v0.3.0.
- github.com/google/go-containerregistry v0.12.1.
- github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20221114162634-781782aa2757.
- golang.org/x/crypto v0.3.0.
- helm.sh/helm/v3 v3.10.2.
- k8s.io/api v0.25.4.
- k8s.io/client-go v0.25.4.
- sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-17 11:31:45 +00:00
Paulo Gomes d25ed0c8c4
build: Bump golang-with-libgit2 to v0.4.0
The new version uses libgit2 1.5.0 and requires git2go/v34.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-10-26 14:06:14 +01:00
Paulo Gomes 1ab76264de
Bump libgit2 image to v0.3.0
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-29 06:55:18 +01:00
Paulo Gomes 50ef51b59d
fuzz: Ensure latest base images are used
Latest base image should contain Go 1.18, removing
the need of updating that ourselves, apart from
benefiting from latest changes upstream.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-09-02 17:51:11 +01:00
Paulo Gomes c2353a7fe6
fuzz: Ensure Go 1.18 for fuzz image
- Upgrade fuzz container to Go 1.18.
- Upgrade worker to Go 1.18.
- The mod replace in tests/fuzz was pointing to the wrong controller.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-08-23 08:40:01 +01: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
Philip Laine b47d468e8f
Upgrade to go 1.18
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-07-27 19:02:13 +03: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 aeaeec881e
Update libgit2 to v1.3.2
Updates golang-with-libgit2-all to v0.1.2 which contains libgit2-1.3.2.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-14 12:24:26 +01:00
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
Paulo Gomes 02f5b94baf
Update to golang-with-libgit2-all image
This dependency now releases two different images, one
containing the entire dependency chain for libgit2, and
another containing just the library itself. The latter
will be later used once Managed Transport is completely
removed from source controller.

As part of this update, the image now follows a new tag
format which is semver based and starts at 0.1.0.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-08 09:39:06 +01:00
Paulo Gomes 60e46d139c
Decrease fs perms to 0o700
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-07 09:57:51 +01:00
Paulo Gomes 77fcc88805
Update libgit2 to 1.3.1
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-14 09:59:01 +01:00
Peter Gundel 37551f1964
Reduce file permission
As suggested by @pjbgf

Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>

Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
Signed-off-by: Peter Gundel <mail@petergundel.de>
2022-04-13 17:14:45 +02:00
Peter Gundel 0949d0adb9
Change all file permissions to octal format
This better represent permissions as Linux handles such information in
octal format, meaning that the left-most 0 has an important meaning
and is not to be ignored as normally integers would.

See https://github.com/fluxcd/source-controller/issues/603

Signed-off-by: Peter Gundel <mail@petergundel.de>
2022-04-12 21:24:34 +02:00
Sanskar Jaiswal f8c27a85dd Garbage collect with provided retention options.
Introduce two new flags to configure the ttl of an artifact and the max
no. of files to retain for an artifact. Modify the gc process to
consider the options and use timeouts to prevent the controller from
hanging.
This helps in situations when the SC has already garbage collected the
current artifact but the advertised artifact url is still the same,
which leads to the server returning a 404.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-04-07 18:43:55 +05:30
Ilan 7d9aa8a772 align fuzzing deps
Signed-off-by: Ilan <ilan.pillemer@gmail.com>
2022-03-28 17:21:47 +01:00
Sunny 84bf8c8572 fuzz: Update to use v1beta2 APIs
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-02-23 12:37:48 +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 db0f033409
Add support for multiple fuzz sanitizers
The oss-fuzz repository contains the configuration for fluxcd supported sanitizers.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-15 16:57:38 +00:00
Paulo Gomes 03c56e79a0
Download libgit2 libraries for fuzzing
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-11 12:30:46 +00:00
Paulo Gomes d8da814d2e
Initial fuzzing tests
This PR refactors and supersedes: https://github.com/fluxcd/source-controller/pull/443

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Co-authored-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
Co-authored-by: AdamKorcz <adam@adalogics.com>
2022-02-08 17:49:34 +00:00