Commit Graph

1474 Commits

Author SHA1 Message Date
Sunny b66ff927ae
Merge pull request #761 from souleb/fix-cache-regression
Fix repository cache regression
2022-06-06 17:05:51 +05:30
Soule BA 0d4d78fc6b
Fix repository cache regression
If implemented this make sure we don't unload an index before caching it
during a chart build phase.

Signed-off-by: Soule BA <soule@weave.works>
2022-06-06 13:15:10 +02:00
Stefan Prodan 9e3304144b
Merge pull request #756 from aryan9600/optimized-checkout-tag
Release v0.25.2
2022-06-03 16:39:51 +03:00
Sanskar Jaiswal fd56bcaa8e
Release v0.25.2
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-03 16:26:41 +03:00
Stefan Prodan ea1bab5a73
Merge pull request #759 from fluxcd/log-on-new-artifact
Log on new artifact and failure recovery
2022-06-03 16:15:17 +03:00
Stefan Prodan 2441f1f0e9
Log on new artifact and failure recovery
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-03 15:58:19 +03:00
Stefan Prodan b7281de889
Merge pull request #752 from SomtochiAma/azure-blob-doc
Add docs on managed identity for Azure Blob
2022-06-03 12:30:38 +03:00
Somtochi Onyekwere bb7aa14538 Add docs on managed identity for Azure Blob
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-06-03 10:05:31 +01:00
Hidde Beydals c10c03180d
Merge pull request #755 from aryan9600/optimized-checkout-tag 2022-06-03 10:56:11 +02:00
Sanskar Jaiswal c341ac3364 libgit2: return CheckoutTag with LastRevision
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-03 14:00:23 +05:30
Sunny a6536001eb
Merge pull request #754 from fluxcd/release-v0.25.1
Release v0.25.1
2022-06-03 02:41:11 +05:30
Sunny 34e59f3846
Release v0.25.1
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-03 02:27:06 +05:30
Sunny c5a5707ede
Merge pull request #753 from fluxcd/libgit2-ssh-race-fixes
libgit2/managed: fix race conditions in ssh transport
2022-06-03 02:16:13 +05:30
Sunny 7f7490ebf0
libgit2/managed: fix race issues in ssh transport
Race conditions in ssh smart subtransport caused some goroutines to
panic, resulting in crashing the whole controller, mostly evident in
image-automation-controller CI runs. Panic recovery in the main thread
do not handle goroutine panics. So, the existing panic recovery code in
libgit2 Checkout() methods weren't able to handle it.

This change groups the fields in ssh smart subtransport that may be
accessed by multiple goroutines into a new struct with a mutex. Also
adds panic recovery in the created goroutine to handle any other
possible panics.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-03 01:45:18 +05:30
Hidde Beydals dc1037d962
Merge pull request #751 from aryan9600/chanelog-v0.25.0
Release v0.25.0
2022-06-01 13:19:17 +02:00
Sanskar Jaiswal 04e167cd01 Release v0.25.0
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-01 16:27:30 +05:30
Sunny 8a99fc7fe8
Merge pull request #750 from aryan9600/fix-checkout-branch
libgit2: fix checkout logic for CheckoutBranch
2022-06-01 14:36:22 +05:30
Sanskar Jaiswal ae27f9ec69 libgit2: fix checkout logic for CheckoutBranch
Use the target commit, to checkout tree and set the head to the desired
branch instead of doing a hard reset to the target commit.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-06-01 14:14:28 +05:30
Sunny c68c62ca12
Merge pull request #749 from fluxcd/docker-registry-host-mismatch
registry: repo URL and dockerconfig URL mismatch
2022-06-01 00:42:13 +05:30
Sunny f79fd034fd
registry: repo URL and dockerconfig URL mismatch
Registry login option should verify that the obtained dockerconfig
credentials are for the same host. When the helmrepo URL and the URL in
docker auth config don't match, the docker config store returns an
empty auth config, instead of failing. This results in accepting empty
username and password. The HelmRepo would appear to be ready in such
situation because the creds are empty, no login is attempted. But when
a HelmChart tries to use the login options, it'd fail.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-06-01 00:09:36 +05:30
Stefan Prodan fe31ff9e77
Merge pull request #748 from fluxcd/oci-helmrepo-refactor
OCI HelmRepo: handle status conditions in-line
2022-05-31 11:30:09 +03:00
Sunny 9fe287d912
helmrepo: rm stale condition when type switching
Remove stale condition from HelmRepo during garbage collection when a
type switch to OCI HelmRepo occurs. This ensures the OCI HelmRepo does
not have any conditions from the previous type.

Co-authored-by: Soule BA <soule@weave.works>
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-05-31 03:53:33 +05:30
Sunny d22758643b
oci-helmrepo: handle conditions summary in-line
Refactor the OCI HelmRepo reconciler to remove extra custom status
conditions and manage Ready, Reconciling and Stalled conditions within
the reconciler, in-line.
The internal/reconcile/summarize package uses the patch helper
conditions summary before patching which results in overwriting the
Ready condition with Reconciling condition as it's a negative polarity
condition.
For OCI HelmRepository, since it's a simple reconciler, it'd be better
to not introduce extra conditions and utilize the three base conditions
to represent the status. In order to have the same consistent status
conditions, a new summarization is written within the reconciler based
on the context. It takes into consideration a lot of the details from
the internal/reconcile/summarize package and handles certain scenarios
in context specific ways. All the result and error abstractions are
removed since they are only needed when using internal/reconcile
package.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-05-31 03:53:28 +05:30
Sunny 9d6eadaa4e
Merge pull request #744 from fluxcd/libgit2-enable-tests
libgit2: Enable tests
2022-05-29 15:54:38 +05:30
Sunny 86610667b1
libgit2: Enable tests
TestMain() without m.Run() resulted in none of the tests being run.

This libgit2 package contains tests for both managed and unmanaged
transports, enabling it in TestMain() for everything results in the
unmanaged transport tests to not run. Add managed transport
initialization call to all the managed transport tests to allow
unmanaged transport tests to run.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-05-29 15:28:08 +05:30
Stefan Prodan 36bbaf0a49
Merge pull request #743 from fluxcd/libgit2-transport-opt-ctx
libgit2: Pass ctx to all the transport opts
2022-05-29 11:17:28 +03:00
Sunny e0883ffb20
libgit2: Pass ctx to all the transport opts
The context passed to Checkout() has a timeout. Pass it forward to
the transport in the option for all the checkouts.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-05-28 22:14:21 +05:30
Max Jonas Werner a6f19b3cda
Merge pull request #728 from souleb/revisit-oci-events
Helm reconcilers conditions and test improvements
2022-05-27 15:52:32 +02:00
Soule BA b98093d0a9
Replace stalling events in HelmChart and HelmRepository_OCI
The setupRegistryServer has been refactored to take into account #690
reviews.

Signed-off-by: Soule BA <soule@weave.works>
2022-05-27 15:35:49 +02:00
Paulo Gomes 4b3e0f9a11
Merge pull request #740 from pjbgf/ssh-context
libgit2: enforce context timeout
2022-05-27 14:14:23 +01:00
Paulo Gomes 978148ea71
libgit2: enforce context timeout
Some scenarios could lead a goroutine to be running indefinetely within managed ssh.
Previously between the two git operations, the reconciliation
could take twice the timeout set for the Flux object.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-27 13:59:50 +01:00
Paulo Gomes 7953d0ea91
Merge pull request #741 from aryan9600/improve-managed
gitrepo: set conditions in gitCheckout
2022-05-27 13:59:31 +01:00
Sanskar Jaiswal 613ccc0ba5 gitrepo: set conditions in gitCheckout
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 16:05:02 +05:30
Paulo Gomes 82cd05eb3d
Merge pull request #727 from aryan9600/improve-managed
Remove dependency on libgit2 credentials callback
2022-05-27 10:27:02 +01:00
Sanskar Jaiswal 972d1cac2a fix docs, error handling and managed proxy auth
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Sanskar Jaiswal ec45a612b1 enable managed transport for controller tests
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Sanskar Jaiswal 5152721ae0 factor out unmanaged checkout into its own functions
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Sanskar Jaiswal 94c50fa3a8 remvoe support for sha1 and md5 hashing for public keys
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Sanskar Jaiswal 7501e8622c add method to disable features internally
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Sanskar Jaiswal 90ec1e230c expand proxy tests to cover managed transport
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Co-authored-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-27 14:01:23 +05:30
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
Sanskar Jaiswal d4beacb6ad Remove dependency on libgit2 credentials callback
Injects transport and auth options at the transport level directly to
bypass the inbuilt credentials callback because of it's several
shortcomings. Moves some of the pre-existing logic from the reconciler
to the checkout implementation.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-05-27 14:01:23 +05:30
Stefan Prodan 5c9a8443d1
Merge pull request #731 from fluxcd/update-deps-cves
Update Alpine to v3.16
2022-05-27 11:28:42 +03:00
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 dca27ad850
Update Alpine to v3.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-27 10:59:41 +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 18e86345ad
Merge pull request #739 from pjbgf/update-dependencies
Update dependencies
2022-05-26 15:26:38 +01:00
Paulo Gomes e35eb7398d
Update GH Actions
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-26 14:57:34 +01: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
Paulo Gomes e2fe5b890c
Merge pull request #736 from fluxcd/gitrepo-checkout-typed-error
gitrepo: gitCheckout() return typed errors only
2022-05-26 09:19:46 +01:00