Commit Graph

253 Commits

Author SHA1 Message Date
dependabot[bot] f8c8b157e0
build(deps): bump github.com/sigstore/rekor
Bumps [github.com/sigstore/rekor](https://github.com/sigstore/rekor) from 0.12.1-0.20220915152154-4bb6f441c1b2 to 1.1.1.
- [Release notes](https://github.com/sigstore/rekor/releases)
- [Changelog](https://github.com/sigstore/rekor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sigstore/rekor/commits/v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/sigstore/rekor
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:36:47 +00:00
Stefan Prodan f58c229bc6 Update cosign to v2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-22 11:08:12 +02:00
dependabot[bot] b185a0b74f
build(deps): bump github.com/cloudflare/circl from 1.3.2 to 1.3.3
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.2...v1.3.3)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-12 05:31:52 +00:00
dependabot[bot] 909387deda
build(deps): bump github.com/docker/distribution
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 20:50:27 +00:00
Stefan Prodan 161d1d0c8b
Update dependencies
- github.com/fluxcd/pkg/oci v0.23.0
- github.com/fluxcd/pkg/untar v0.3.0
- github.com/google/go-containerregistry v0.15.1
- github.com/minio/minio-go/v7 v7.0.52
- github.com/prometheus/client_golang v1.15.1
- golang.org/x/crypto v0.9.0
- golang.org/x/sync v0.2.0
- google.golang.org/api v0.121.0
- helm.sh/helm/v3 v3.11.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-09 11:01:46 +03:00
Somtochi Onyekwere 37e113a422 Support Azure Workload Identity
With an update to github.com/fluxcd/pkg/oci v0.22.0.

This includes a pin of `github.com/docker/docker` to `v20.10.x`, to
prevent Oras from complaining.

Co-authored-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-03-30 11:14:55 +02:00
Hidde Beydals 69747b6239
Merge branch 'main' into dependabot/go_modules/github.com/opencontainers/runc-1.1.5 2023-03-30 00:10:20 +02:00
Hidde Beydals 998541fe71
Update dependencies
- cloud.google.com/go/storage to v1.30.1
- github.com/minio/minio-go/v7 to v7.0.50
- google.golang.org/api to v0.114.0
- k8s.io/utils to v0.0.0-20230313181309-38a27ef9d749
- github.com/opencontainers/runc to v1.1.5

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 16:59:43 +02:00
dependabot[bot] 08e416d832
build(deps): bump github.com/opencontainers/runc from 1.1.2 to 1.1.5
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.2 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 14:50:31 +00:00
Hidde Beydals 268db50890
Ensure unique leader election ID for watch options
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 14:02:20 +02:00
Hidde Beydals ed98913897
Add reconciler sharding capability based on label
With this enhancement, the controller can be configured with
`--watch-label-selector`, after which only objects with this label will
be reconciled by the controller.

This allows for horizontal scaling of the source-controller, where each
controller can be deployed multiple times with a unique label selector
which is used as the sharding key.

Note that this also requires configuration of the `--storage-adv-addr`
to a unique address (in combination with a proper Service definition).
This to ensure the Artifacts handled by the sharding controller point
to a unique endpoint.

In addition, Source object kinds which have a dependency on another
kind (i.e. a HelmChart on a HelmRepository) need to have the same
labels applied to work as expected.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-29 12:02:22 +02:00
Stefan Prodan e9de3a7c4c
Update `fluxcd/pkg/apis/meta` to v1.0.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-03-27 18:41:49 +03:00
Sunny e543797c77 Update sourceignore to fix pattern domain bug
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-03-16 17:33:22 +05:30
Hidde Beydals 0d0e4709fb
Update dependencies
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.4.0
- github.com/fluxcd/pkg/git/gogit to v0.8.1
- github.com/fluxcd/pkg/gittestserver to v0.8.2
- github.com/fluxcd/pkg/oci to v0.21.1
- github.com/fluxcd/pkg/ssh to v0.7.3
- github.com/google/go-containerregistry/pkg/authn/k8schain to v0.0.0-20230307034325-57f010d26af8
- golang.org/x/crypto to v0.7.0

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 16:51:50 +01:00
Hidde Beydals 43f83edb07
Use `logger.SetLogger` to also configure `klog`
This uses the newly introduced helper from runtime, which also
configures the logger for `klog`.

Resulting in all logs now being properly formatted in, even when logged
by internal Kubernetes elements like the leader election or a dynamic
client.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-07 16:25:30 +01:00
Hidde Beydals 3e5be0b3a4
Update dependencies
- github.com/fluxcd/pkg/apis/event to v0.4.1
- github.com/fluxcd/pkg/apis/meta to v0.19.1
- github.com/fluxcd/pkg/oci to v0.20.1
- github.com/fluxcd/pkg/runtime to v0.30.0
- github.com/fluxcd/pkg/ssh to v0.7.2
- github.com/google/go-containerregistry/pkg/authn/k8schain to v0.0.0-20230227161101-1b8dc2babc55
- github.com/onsi/gomega to v1.27.2
- google.golang.org/api to v0.111.0
- k8s.io/api to v0.26.2
- k8s.io/apimachinery to v0.26.2
- k8s.io/client-go to v0.26.2
- sigs.k8s.io/controller-runtime to v0.14.5
- Unpin github.com/emicklei/go-restful as it is no longer an active
  dependency.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-03-02 17:31:25 +01:00
Sanskar Jaiswal d32470ee95 gitrepo: use absolute refs when ref name is provided
Use `commit.AbsoluteReference()` to show the full reference when
`.spec.ref.name` is provided. For eg: `refs/heads/main@sha1:<SHA>`.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-03-02 16:52:43 +01:00
Hidde Beydals 371025b197 Update dependencies
- github.com/distribution/distribution/v3 to v3.0.0-20230223072852-e5d5810851d1
- github.com/fluxcd/pkg/oci to v0.20.0
- github.com/fluxcd/pkg/sourceignore to v0.3.2
- github.com/google/go-containerregistry/pkg/authn/k8schain to v0.0.0-20230217043738-4a0e0af4bf95
- github.com/minio/minio-go/v7 to v7.0.49
- github.com/onsi/gomega to v1.27.1
- github.com/sigstore/sigstore to v1.5.2
- k8s.io/utils to v0.0.0-20230220204549-a5ecb0141aa5

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-23 12:05:40 +01:00
dependabot[bot] 93acd4abec
build(deps): bump github.com/containerd/containerd from 1.6.15 to 1.6.18
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.15 to 1.6.18.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.15...v1.6.18)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 14:28:26 +00:00
Hidde Beydals a640dcb971 Update dependencies
- github.com/distribution/distribution/v3 to v3.0.0-20230214150026-36d8c594d7aa
- github.com/fluxcd/pkg/git to v0.10.0
- github.com/fluxcd/pkg/git/gogit to v0.7.1
- github.com/fluxcd/pkg/gittestserver to v0.8.1
- github.com/fluxcd/pkg/helmtestserver to v0.11.1
- github.com/fluxcd/pkg/oci to v0.19.1
- github.com/fluxcd/pkg/runtime to v0.29.0
- github.com/fluxcd/pkg/sourceignore to v0.3.1
- github.com/fluxcd/pkg/ssh to v0.7.1
- github.com/fluxcd/pkg/version to v0.2.1

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-16 12:18:41 +01:00
Hidde Beydals ecd2544bbe Update dependencies
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v1.3.1
- github.com/Azure/azure-sdk-for-go/sdk/storage/azblob to v1.0.0
- helm.sh/helm/v3 v3.11.1
- k8s.io/utils v0.0.0-20230209194617-a36077c30491
- sigs.k8s.io/controller-runtime v0.14.4
- github.com/distribution/distribution/v3 to v3.0.0-20230131081513-cf87e8d07e8d
- github.com/docker/cli to v23.0.1+incompatible
- github.com/fluxcd/pkg/oci to v0.19.0
- github.com/google/go-containerregistry/pkg/authn/k8schain to v0.0.0-20230209165335-3624968304fd
- github.com/minio/minio-go/v7 to v7.0.48
- google.golang.org/api to v0.110.0
- helm.sh/helm/v3 to v3.11.1
- k8s.io/utils to v0.0.0-20230209194617-a36077c30491
- sigs.k8s.io/controller-runtime to v0.14.4

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 16:04:44 +01:00
Hidde Beydals 9283894bbe Use MetaDigestKey from event API
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals fe8bc43f84 controllers: use RFC-0005 format for Git revision
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals 6e0a6f11d4 storage: calculate `Digest` for `Artifact`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Sunny 75cde08ff0 Use condition checker with gomega WithT
This allows using the condition checker as a test helper with proper
test like assertion failure and stacktrace.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-02-07 20:11:46 +05:30
Stefan Prodan f89d07579f
Update dependencies
- k8s.io/* v0.26.1
- helm.sh/helm/v3 v3.11.0
- github.com/sigstore/sigstore v1.5.1
- github.com/google/go-containerregistry v0.13.0
- github.com/fluxcd/pkg/oci v0.18.0
- github.com/fluxcd/pkg/runtime v0.27.0
- cloud.google.com/go/storage v1.29.0
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.0
- sigs.k8s.io/controller-runtime v0.14.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-27 14:03:04 +02:00
Sunny f707193e90 Update git dependencies for bearer token support
Also update API spec to mention bearer token field in git secret.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-23 21:14:07 +05:30
Sunny e0cf840d02 Set rate limiter option in test reconcilers
Set the default rate limiter configuration used in main.go in the
test reconcilers as well.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-18 16:10:30 +05:30
dependabot[bot] 85f0fd6110
build(deps): bump github.com/containerd/containerd from 1.6.10 to 1.6.12
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.10 to 1.6.12.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.10...v1.6.12)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 09:46:21 +00:00
Sunny b044c6b7ff Update fluxcd/pkg/runtime dependency
Update pkg/runtime for progressive status tooling.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Paulo Gomes da1026654c
Update dependencies
- cloud.google.com/go/storage to version 1.28.1.
- github.com/AdaLogics/go-fuzz-headers to version 0.0.0-20221206110420-d395f97c4830.
- github.com/Azure/azure-sdk-for-go/sdk/storage/azblob to version 0.6.1.
- github.com/distribution/distribution/v3 to version 3.0.0-20221208165359-362910506bc2.
- github.com/google/go-containerregistry/pkg/authn/k8schain to version 0.0.0-20221213180026-23d895d08035.
- github.com/minio/minio-go/v7 to version 7.0.45.
- github.com/onsi/gomega to version 1.24.2.
- github.com/sigstore/sigstore to version 1.5.0.
- golang.org/x/crypto to version 0.4.0.
- google.golang.org/api to version 0.105.0.
- k8s.io/utils to version 0.0.0-20221128185143-99ec85e7a448.
- github.com/docker/cli to version 20.10.22+incompatible.
- github.com/fluxcd/pkg/git/gogit to version 0.4.0.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-16 09:50:07 +00:00
Sunny 67015ca416 Update fluxcd/pkg/oci dependency
Fixes contextual login for AWS with aws-sdk-go-v2 and contextual login
with registry address.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-12-15 16:53:02 +05:30
Hidde Beydals 9ed8339a93 helm: Update SDK to v3.10.3
This patches a number of security related issues. Refer to
https://github.com/helm/helm/releases/tag/v3.10.3 for precise
information.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-12-14 19:14:18 +00:00
Hidde Beydals 57543ae625 minio: use container image for tests
This drops the usage of `play.min.io` in favor of running a local
container image for tests. Which is a better practice, and resolves
test flakiness due to the endpoint being unavailable once in awhile.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-12-14 11:56:53 +00:00
Paulo Gomes ddb7afe81d
git: Fix issue with recurseSubmodules
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-12-12 15:58:18 +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
Paulo Gomes 6b60251f4e
build: Update go.mod and go.sum
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-11-24 11:11:12 +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
Sanskar Jaiswal b98b9a92b6 gitrepo: bump git packages
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-11-16 19:34:11 +05:30
Stefan Prodan 65e1041492
Use Flux Event API v1beta1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-11-09 11:06:23 +02:00
Hidde Beydals 206fb838e0 Update dependencies
- cloud.google.com/go/storage to v1.28.0
- github.com/distribution/distribution/v3 to v3.0.0-20221108081720-e9a25da7a47e
- github.com/docker/cli to v20.10.21+incompatible
- github.com/google/go-containerregistry to v0.12.0
- github.com/google/go-containerregistry/pkg/authn/k8schain to v0.0.0-20221103173901-353a117661ae
- github.com/minio/minio-go/v7 to v7.0.43
- github.com/onsi/gomega to v1.24.0
- github.com/prometheus/client_golang to v1.14.0
- github.com/sigstore/sigstore to v1.4.5
- google.golang.org/api to v0.102.0
- k8s.io/utils to v0.0.0-20221107191617-1a15be271d1d
- sigs.k8s.io/cli-utils to v0.34.0
- sigs.k8s.io/controller-runtime to v0.13.1

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-08 14:16:00 +00:00
Hidde Beydals 76c1f531bd Update to azure-sdk-for-go/sdk/azcore v1.2.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-08 13:42:00 +00:00
Somtochi Onyekwere e50b6ba8da Update Azure Blob Storage SDK to v0.5.1
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-11-08 13:41:52 +00:00
Somtochi Onyekwere 754b20b9e0 Update Azure Blob Storage SDK to v0.5.0
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-11-08 13:40:08 +00:00
Paulo Gomes 6b04907f5f
Bump go-git to enable multi_ack
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-10-26 14:26:01 +01: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
Sanskar Jaiswal b6d6b593c8
gitrepo: refactor reconciler to use fluxcd/pkg/git
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-10-26 14:04:00 +01:00
Stefan Prodan 1931800661
Update dependencies
- `k8s.io/*` v0.25.3
- `helm.sh/helm/v3` v3.10.1
- `sigstore/cosign` v1.13.1
- `fluxcd/pkg/oci` v0.14.0
- `fluxcd/pkg/runtime` v0.22.0
- `golang.org/x/text` v0.4.0 (fix CVE-2022-32149)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-20 18:11:36 +03:00
Sunny df1894b7ed
update dependencies
- replace github.com/darkowlzz/controller-check/status ->
  github.com/fluxcd/pkg/runtime/conditions/check
- github.com/fluxcd/pkg/runtime - v0.21.0
- github.com/fluxcd/pkg/oci - v0.13.0
- github.com/fluxcd/pkg/apis/meta - v0.17.0
- k8s.io/cli-runtime - v0.25.2

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-10-11 19:08:44 +05:30
Sunny 36a9e99e27 Update pkg/oci to v0.11.0
This version allows for using the OCI HelmRepo URL that points at the
root of an AWS ECR repository.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-09-29 19:48:34 +05:30
Stefan Prodan 8614543e73
Update dependencies
- k8s.io/* v0.25.2
- helm.sh/helm/v3 v3.10.0
- sigs.k8s.io/controller-runtime v0.13.0
- cloud.google.com/go/storage v1.27.0
- fluxcd/pkg/runtime v0.19.0
- sigstore/sigstore v1.4.2
- github.com/fluxcd/git2go/v33 v33.0.9-flux (use Flux own fork)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-28 14:45:19 +03:00
Hidde Beydals 588fe0d15a Update Bucket related SDK dependencies
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-09-22 14:57:25 +00:00
Stefan Prodan b5ffc9fc65
Update sigstore/cosign to v1.12.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-22 11:52:19 +03: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
Somtochi Onyekwere c38fafe128 Align controller logs to Kubernetes structured logging
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-31 14:24:40 +01:00
Stefan Prodan 6a367ec70b
Update Kubernetes packages to v1.25.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-26 12:26:38 +03:00
Paulo Gomes aac18f5273
Update dependencies
Dependencies updated:
- cloud.google.com/go/storage to version 1.25.0.
- github.com/Azure/azure-sdk-for-go/sdk/azcore to version 1.1.2.
- github.com/ProtonMail/go-crypto to version 0.0.0-20220812175011-7fcef0dbe794.
- github.com/distribution/distribution/v3 to version 3.0.0-20220816150328-6c237953cbbe.
- github.com/fluxcd/gitkit to version 0.6.0.
- github.com/fluxcd/pkg/gittestserver to version 0.6.0.
- github.com/fluxcd/pkg/oci to version 0.5.1.
- github.com/google/go-containerregistry to version 0.11.0.
- github.com/google/go-containerregistry/pkg/authn/k8schain to version 0.0.0-20220808030257-7196cf3dc436.
- github.com/minio/minio-go/v7 to version 7.0.34.
- github.com/onsi/gomega to version 1.20.0.
- github.com/prometheus/client_golang to version 1.13.0.
- golang.org/x/crypto to version 0.0.0-20220722155217-630584e8d5aa.
- golang.org/x/net to version 0.0.0-20220812174116-3211cb980234.
- golang.org/x/sync to version 0.0.0-20220722155255-886fb9371eb4.
- google.golang.org/api to version 0.93.0.
- helm.sh/helm/v3 to version 3.9.3.
- k8s.io/api to version 0.24.3.
- k8s.io/apimachinery to version 0.24.3.
- k8s.io/client-go to version 0.24.3.
- k8s.io/utils to version 0.0.0-20220812165043-ad590609e2e5.

Replace removed for gopkg.in/yaml.v3@v3.0.1 and github.com/containerd/containerd@v1.6.6,
as they no longer need to be enforced.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-08-17 16:57:34 +01:00
Stefan Prodan f873d71ec5
Use sourceignore from fluxcd/pkg
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-17 18:04:48 +03:00
Somtochi Onyekwere 35268638ba Add Support for SAS keys in Azure Blob
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-11 20:49:59 +01:00
Stefan Prodan 94e98ee5ca
Add the opencontainers annotations to API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 12:58:04 +03:00
Stefan Prodan 63c94397f7
Implement OCI auth for cloud providers
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-04 13:29:03 +03:00
Somtochi Onyekwere 25b88256ef
Add tests for reconcile delete
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-02 13:11:08 +03:00
Philip Laine fdf6b01817
Update Azure Go SDK
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-08-01 12:27:01 +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
Soule BA 3717f02d46
Bump Helm to v3.9.1
Signed-off-by: Soule BA <soule@weave.works>
2022-07-14 01:18:27 +02:00
Paulo Gomes 73ce792414
Fix github.com/emicklei/go-restful (CVE-2022-1996)
This addresses CVE-2022-1996, due to v2.16.0 including
emicklei/go-restful@9266625.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-13 09:49:18 +01:00
Paulo Gomes 0633c57629
Update dependencies
- cloud.google.com/go/storage to version 1.23.0.
- github.com/ProtonMail/go-crypto to version 0.0.0-20220623141421-5afb4c282135.
- github.com/distribution/distribution/v3 to version 3.0.0-20220702071910-8857a1948739.
- github.com/minio/minio-go/v7 to version 7.0.31.
- golang.org/x/crypto to version 0.0.0-20220622213112-05595931fe9d.
- golang.org/x/net to version 0.0.0-20220706163947-c90051bbdb60.
- google.golang.org/api to version 0.86.0.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-07 17:23:22 +01:00
Sunny f941f5ce24
Update go-yaml to v3.0.1
Fix CVE-2022-28948

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-30 00:21:59 +05:30
Soule BA 988fd1fba9
disable cache in oci registry client
If implemented, the oci registry client is created with cache disabled.

Signed-off-by: Soule BA <soule@weave.works>
2022-06-29 12:47:40 +02:00
Paulo Gomes ea7027ac54
Update dependencies
- github.com/fluxcd/pkg/apis/meta to version 0.14.2.
- github.com/fluxcd/pkg/runtime to version 0.16.2.
- google.golang.org/api to version 0.83.0.
- k8s.io/api to version 0.24.1.
- github.com/fluxcd/pkg/apis/meta to version 0.14.2.
- k8s.io/apimachinery to version 0.24.1.
- github.com/fluxcd/pkg/helmtestserver to version 0.7.4.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-08 10:19:05 +01:00
Sanskar Jaiswal 47692530d7 libgit2: fix ssh host key verification regression
Earlier, host key verification could potentially fail if there were
multiple entries in the known_hosts file and if the intended encryption
algorithm wasn't the first entry. This happened because we used the same
hasher object to compute the sum of all the public keys present in the
known_hosts file, which led to invalid hashes, resulting in a mismatch
when compared with the hash of the advertised public key. This is fixed,
by not creating the hasher ourselves and instead delegating that to the
function actually doing the matching, ensuring that a new hasher is used
for each comparison.

Regression introduced in v0.25.0 and reported in
https://github.com/fluxcd/image-automation-controller/issues/378

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-08 13:59:32 +05:30
Paulo Gomes 7c9fb1dd25
Update dependencies
- github.com/distribution/distribution/v3 to version 3.0.0-20220526142353-ffbd94cbe269.
- github.com/docker/cli to version 20.10.17+incompatible.
- github.com/elazarl/goproxy to version 0.0.0-20220529153421-8ea89ba92021.
- github.com/fluxcd/pkg/gittestserver to version 0.5.4.
- github.com/fluxcd/pkg/helmtestserver to version 0.7.3.
- github.com/fluxcd/pkg/ssh to version 0.4.1.
- github.com/minio/minio-go/v7 to version 7.0.27.
- golang.org/x/crypto to version 0.0.0-20220525230936-793ad666bf5e.
- golang.org/x/net to version 0.0.0-20220607020251-c690dde0001d.
- golang.org/x/sync to version 0.0.0-20220601150217-0de741cfad7f.
- google.golang.org/api to version 0.82.0.
- github.com/containerd/containerd to version v1.6.6.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-06-07 15:29:06 +01:00
Sanskar Jaiswal 7d2bc64f47 fix panics on unmanaged http and proxy on managed http
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Hidde Beydals 7fc9798405
Update dependencies
- cloud.google.com/go/storage to v1.22.1
- github.com/ProtonMail/go-crypto to v0.0.0-20220517143526-88bb52951d5b
- github.com/distribution/distribution/v3 to v3.0.0-20220516112011-c202b9b0d7b7
- github.com/docker/cli to v20.10.16+incompatible
- github.com/fluxcd/gitkit to v0.5.1
- github.com/fluxcd/pkg/helmtestserver to v0.7.2
- github.com/fluxcd/pkg/ssh to v0.4.0
- github.com/phayes/freeport to v0.0.0-20220201140144-74d24b5ae9f5
- github.com/prometheus/client_golang to v1.12.2
- golang.org/x/crypto to v0.0.0-20220518034528-6f7dac969898
- golang.org/x/net to v0.0.0-20220524220425-1d687d428aca
- golang.org/x/sync to v0.0.0-20220513210516-0976fa681c29
- google.golang.org/api to v0.81.0
- sigs.k8s.io/cli-utils to v0.31.1

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-27 11:11:44 +03:00
Stefan Prodan 441f4c53c8
Update runc to v1.1.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-27 10:59:40 +03:00
Paulo Gomes b0c59d1fbb
Update dependencies
- fluxcd/pkg/apis/meta v0.14.1
- fluxcd/pkg/runtime v0.16.1
- gopkg.in/yaml.v3 v3.0.0

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-26 14:48:36 +01:00
Stefan Prodan f3a372da60
Update dependencies
- fluxcd/pkg/apis/meta v0.14.0
- fluxcd/pkg/runtime v0.16.0
- k8s.io/* v0.24.0
- helm.sh/helm/v3 v3.9.0-rc.1 (required by breaking changes in Kubernetes 1.24)

Note that fluxcd/pkg/runtime v0.16 comes with support for Kubernetes API Priority and Fairness feature.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-24 14:48:32 +03: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 8b50367849
libgit2: Add support for hashed known_hosts
Hashed known_hosts was previously only supported when using
go-git. Now both Git implementations benefit from this
features, and the code coverage across them can ensure no
future regression.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-16 16:57:22 +01:00
Paulo Gomes 262efc08bc
Add git-optimized-clones feature gate
OptimizedGitClones decreases resource utilization for GitRepository
reconciliations. It supports both go-git and libgit2 implementations
when cloning repositories using branches or tags.

This is an opt-out feature, which can be disabled by starting the
controller with the argument '--feature-gates=OptimizedGitClones=false'.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-11 14:39:21 +01:00
Paulo Gomes 2b59150fbe
tests: algorithms test coverage for go-git and libgit2
Assures support for:
- Authentication Key Types
  - rsa
  - ecdsa P256
  - ecdsa P384
  - ecdsa P521
  - ed25519
- Key Exchange Algoritms:
  - diffie-hellman-group14-sha1
  - diffie-hellman-group14-sha256
  - curve25519-sha256
  - ecdh-sha2-nistp256
  - ecdh-sha2-nistp384
  - ecdh-sha2-nistp521
  - curve25519-sha256@libssh.org
- HostKey Algoritms:
  - ssh-rsa
  - rsa-sha2-256
  - rsa-sha2-512
  - ecdsa-sha2-nistp256
  - ecdsa-sha2-nistp384
  - ecdsa-sha2-nistp521
  - ssh-ed25519

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-09 13:31:54 +01:00
Hidde Beydals 5b32ef8269 Update dependencies
- github.com/fluxcd/pkg/runtime to v0.14.2
- golang.org/x/crypto to v0.0.0-20220427172511-eb4f295cb31f
- google.golang.org/api to v0.77.0
- k8s.io/api to v0.23.6
- k8s.io/client-go to v0.23.6

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-05-03 12:44:15 +02:00
Hidde Beydals 67ef697630 Update github.com/elazarl/goproxy
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-19 12:19:54 +02:00
Hidde Beydals 18b59351c1 Update dependencies
Azure SDK dependencies cannot be updated, as this requires us to move to
Go 1.18.

- cloud.google.com/go/storage to v1.22.0
- github.com/ProtonMail/go-crypto to v0.0.0-20220407094043-a94812496cf5
- github.com/darkowlzz/controller-check to v0.0.0-20220325122359-11f5827b7981
- github.com/elazarl/goproxy to v0.0.0-20220403042543-a53172b9392e
- github.com/fluxcd/pkg/gittestserver to v0.5.2
- github.com/go-logr/logr to v1.2.3
- github.com/minio/minio-go/v7 to v7.0.24
- github.com/onsi/gomega to v1.19.0
- golang.org/x/crypto to v0.0.0-20220411220226-7b82a4e95df4
- google.golang.org/api to v0.74.0

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-15 16:41:42 +02:00
Hidde Beydals 59df52d332 Update sigs.k8s.io/cli-utils to v0.29.4
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-15 15:47:41 +02:00
Stefan Prodan 0f64fef2a1
Update dependencies
- helm.sh/helm/v3 v3.8.2
- k8s.io/api v0.23.5
- fluxcd/pkg/runtime v0.14.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-15 10:49:31 +03:00
Paulo Gomes 4198191759
Add flags to configure exponential back-off retry
Add two new flags to enable users to configure exponential
back-off for Flux objects. The default values are now
set to 750ms for minimum retry time, and 15min for max.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-12 10:44:46 +01:00
Sunny d939e98ec2
Introduce separate positive polarity conditions
Introduce separate positive polarity conditions which are used to set
Ready condition. Move the "artifact stored" ready condition into
ArtifactInStorage positive polarity condition. If ArtifactInStorage is
True and there's no negative polarity condition present, the Ready
condition is summarized with ArtifactInStorage condition value.

Also, update the priorities of the conditions. ArtifactInStorage has
higher priority than SourceVerfied condition. If both are present, the
Ready condition will have ArtifactInStorage.
The negative polarity conditions are reordered to have the most likely
actual cause of failure condition the highest priority, for example
StorageOperationFailed, followed by the conditions that are reconciled
first in the whole reconciliation so as to prioritize the first failure
which may be the cause of subsequent failures.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-03-30 17:02:59 +05:30
Paulo Gomes b73f18a091
Update golang.org/x/crypto
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-25 19:08:53 +00:00
Hidde Beydals 55b07f97f0 Update various dependencies
- cloud.google.com/go/storage to v1.21.0
- github.com/Azure/azure-sdk-for-go/sdk/azcore to v0.22.0
- github.com/Azure/azure-sdk-for-go/sdk/azidentity to v0.13.2
- github.com/elazarl/goproxy to v0.0.0-20220115173737-adb46da277ac
- github.com/fluxcd/pkg/apis/meta to v0.12.1
- github.com/fluxcd/pkg/gittestserver to v0.5.1
- github.com/fluxcd/pkg/helmtestserver to v0.7.1
- github.com/fluxcd/pkg/runtime to v0.13.2
- github.com/fluxcd/pkg/ssh to v0.3.2
- github.com/libgit2/git2go/v33 to v33.0.9
- github.com/minio/minio-go/v7 to v7.0.23
- github.com/onsi/gomega to v1.18.1
- google.golang.org/api to v0.73.0
- sigs.k8s.io/cli-utils to v0.29.3

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-16 11:15:59 +01:00
Hidde Beydals 44198da663 Update golang.org/x/crypto to latest
This pins it to the latest version which introduces support for
rsa-ssh2-256/512.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-15 22:17:01 +01:00
Hidde Beydals 458d67d0a2 Remove github.com/docker/cli replace
This was required by an older version of Helm, which has now updated
the dependency itself.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-15 22:11:52 +01:00
Hidde Beydals c5bfe4f227 Update github.com/docker/distribution to v2.8.0
This mitigates GMS-2022-20.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-15 22:10:53 +01:00
Hidde Beydals 91aba67781 Update Helm to patched v3.8.1
(Forked) version still includes patch to manage HTTP transport.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-11 12:53:30 +01:00
Hidde Beydals ec5bc1ac9a Implement Azure Blob BucketProvider
This commit introduces an Azure Blob BucketProvider implementation,
capable of fetching from objects from public and private "container"
buckets.

The supported credential types are:

- ManagedIdentity with a `resourceId` Secret data field.
- ManagedIdentity with a `clientId` Secret data field.
- ClientSecret with `tenantId`, `clientId` and `clientSecret` Secret
  data fields.
- SharedKey with `accountKey` Secret data field, the Account Name is
  extracted from the endpoint URL specified on the object.

If no Secret is provided, the Bucket is assumed to be public.

Co-authored-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-03 13:20:48 +01:00
Stefan Prodan fe773c510d
Update dependencies
- runc v1.1.0 (CVE fix https://github.com/advisories/GHSA-fgv8-vj5c-2ppq)
- containerd v1.6.1 (CVE fix https://github.com/containerd/containerd/security/advisories/GHSA-crp2-qrr5-8pq7)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-03 12:49:01 +02:00
Paulo Gomes 7d61553463
Remove dependency to helm v2
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-02 17:58:15 +00:00
Paulo Gomes d9d789fdb1
Reuse transport for helm chart download
Reuses the same transport across different helm chart downloads,
whilst resetting the tlsconfig to avoid cross-contamination.

Crypto material is now only processed in-memory and does not
touch the disk.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-03-02 13:02:11 +00:00
Hidde Beydals b28669e446
Update to patched version of Helm 3.8.0
This commit updates to a version of Helm 3.8.0, with patches applied to
deal with memory leak and HTTP transport issues. The latter being
described in https://github.com/fluxcd/source-controller/issues/578.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-02 13:02:07 +00:00
Paulo Gomes be02e15410
Update github.com/sosedoff/gitkit (indirect) to v0.3.0 (CVE fix)
Fixes https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMSATORIGOUUID-72488 in the indirect dependency github.com/satori/go.uuid.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-25 13:25:03 +00:00