Commit Graph

1883 Commits

Author SHA1 Message Date
Hidde Beydals f4eae19045 digest: register SHA1 digest algorithm
This algorithm is used by Git commit SHAs, and opens up the digest API
to work with these references.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals a72badf16b reconcilers: include artifact digest in event meta
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
Hidde Beydals 964b2d3f00 api: introduce `Digest` field to `Artifact`
As discussed in RFC-0005, this introduces a `Digest` field to the
`Artifact` in favor of the now deprecated `Checksum`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-10 20:30:59 +01:00
Sunny d18988e81a
Merge pull request #1016 from fluxcd/condn-checker-with-t
Improve HelmRepository type switching from default to oci
2023-02-09 03:37:25 +05:30
Sunny 42bc3e8b0a helmrepo-oci: check before rec on type switching
When a HelmRepository with "default" spec.type is switched to "oci", the
existing HelmRepository is processed by HelmRepositoryReconciler by
running reconcileDelete() which removes all the previous status
information and allows the HelmRepositoryOCIReconciler to process the
object and add its own status data. But at times, when
HelmRepositoryOCIReconciler starts processing a HelmRepository with
stale status data from the client cache, it contains the stale
conditions that are owned only by HelmRepositoryReconciler and isn't
managed by HelmRepositoryOCIReconciler. This results in situations where
Ready is marked as True with the latest generation of the object and the
unmanaged stale conditions remain in the previous generation, resulting
in unexpected status conditions.

In the observed flaky tests,
`TestHelmRepositoryReconciler_ReconcileTypeUpdatePredicateFilter` would
fail because of stale ArtifactInStorage condition with previous
generation value.

This change adds a check in the HelmRepositoryOCIReconciler to start
processing the object only once the stale unmanaged conditions have been
removed.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-02-07 20:11:49 +05:30
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
Aurel Canciu 5a01112253
Merge pull request #1021 from fluxcd/handle-empty-git-repository
Prevent panic when cloning empty git repository
2023-02-07 14:52:04 +01:00
Aurel Canciu 14a4a5eed6
Prevent panic when cloning empty git repository
This covers the edge case in which a user creates a GitRepository CR
referencing an empty Git repository. Currently, the controller will panic
in this situation since the returned commit pointer is nil.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2023-02-07 13:53:31 +01:00
Hidde Beydals ae3a81eede
Merge pull request #1012 from dholbach/update-maintainers
Paulo is Core Maintainer
2023-02-01 09:40:34 +00:00
Daniel Holbach 768de81787 Paulo is Core Maintainer
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-01-31 17:13:16 +01:00
Sunny 1ec8277526
Merge pull request #1014 from fluxcd/release-v0.34.0
Release v0.34.0
2023-01-31 21:34:18 +05:30
Sunny b0d2ac755a Release v0.34.0
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-31 20:56:10 +05:30
Sunny d54a655d9c
Merge pull request #1013 from fluxcd/helm-oci-download-err
helm/oci: Add context to chart download failure
2023-01-31 19:42:30 +05:30
Sunny f9927e7d46 helm/oci: Add context to download failure
Add chart address in the OCI chart download failure error message to make
it clear about the chart URL that was attempted to download.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-31 19:18:22 +05:30
Stefan Prodan b00658d07e
Merge pull request #1010 from fluxcd/kind-action
CI: Replace engineerd/setup-kind with helm/kind-action
2023-01-30 18:45:07 +02:00
Stefan Prodan 7814754bb7
CI: Replace engineerd/setup-kind with helm/kind-action
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-30 18:25:09 +02:00
Hidde Beydals 874cfd26a2
Merge pull request #1007 from kingdonb/about-sourceignore
Add note about sourceignore recursion
2023-01-30 14:58:15 +00:00
Kingdon Barrett 106f8aea42
Add a note about sourceignore recursion
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2023-01-30 09:47:52 -05:00
Stefan Prodan b9986fab5a
Merge pull request #1009 from fluxcd/container-sbom
build: Enable SBOM and SLSA Provenance
2023-01-30 13:39:04 +02:00
Stefan Prodan 59e061c8ef
build: Enable SBOM and SLSA Provenance
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-27 16:45:41 +02:00
Stefan Prodan 83a40d156b
Update Alpine to 3.17
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-01-27 16:26:47 +02:00
Stefan Prodan a56a8884b1
Merge pull request #1008 from fluxcd/kube-1.26
Update dependencies
2023-01-27 16:21:36 +02:00
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
Hidde Beydals 5984c8182d
Merge pull request #989 from mac-chaffee/no-cache-secrets
Disable caching of secrets and configmaps
2023-01-27 11:50:16 +00:00
Mac Chaffee f84afcb9d3 Disable caching of secrets and configmaps
You can re-enable caching by starting the controller
with the argument '--feature-gates=CacheSecretsAndConfigMaps=true'

Signed-off-by: Mac Chaffee <machaffe@renci.org>
2023-01-27 11:38:56 +00:00
Sunny 9dc4271d30
Merge pull request #1000 from blurpy/feature/git_bearer_token
Document support for bearer token authentication over https in gitrepositories
2023-01-24 18:05:56 +05:30
Christian Ihle 51bb596f08 Document support for bearer token authentication over https in gitrepositories
Signed-off-by: Christian Ihle <blurpy@gmail.com>
2023-01-24 16:00:14 +05:30
Sunny 04b06dd943
Merge pull request #1003 from fluxcd/git-bearer-token-udpate
Update git dependencies for bearer token support
2023-01-24 15:59:54 +05:30
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 e0d9585de2
Merge pull request #999 from fluxcd/test-reconciler-ratelimiter
Set rate limiter option in test reconcilers
2023-01-18 17:15:21 +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
Stefan Prodan c2e605a5e2
Merge pull request #998 from fluxcd/oci-testdata-umask-fix
Fix OCIRepository testdata permissions
2023-01-18 10:12:46 +02:00
Sunny baaa412779 Fix ocirepo testdata permissions
On Ubuntu, and maybe some others, the
`TestOCIRepository_reconcileArtifact` test fails due to difference in
file permission, which results in different artifact checksum. This is
due to the default umask on ubuntu. Reset the permission of the testdata
to fix the test on ubuntu.
There's a similar fix in `TestGitRepositoryReconciler_reconcileArtifact`
test.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-18 02:59:15 +05:30
Sunny 8785ebc9ae
Merge pull request #996 from ybelleguic/fix-typo-in-secretRef-helmRepo
fix typo in helmRepo secretRef spec CRD
2023-01-16 20:25:45 +05:30
Yohan Belléguic 2741d0a150 fix typo in helmRepo secretRef spec CRD
When using a TLS authentication, user can provide a custom certificate
by setting the caFile key in the secret, not caCert.

Signed-off-by: Yohan Belléguic <yohan.belleguic@arkea.com>
2023-01-16 19:52:06 +05:30
Hidde Beydals b939216694
Merge pull request #997 from fluxcd/dependabot/go_modules/github.com/containerd/containerd-1.6.12
build(deps): bump github.com/containerd/containerd from 1.6.10 to 1.6.12
2023-01-10 10:08:26 +00:00
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 802193c4e6
Merge pull request #974 from fluxcd/progressive-status
Introduce Progressive status
2023-01-10 15:13:50 +05:30
Sunny 197a03b989 update docs with progressive status
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny 7b44c9db0d Add progressive status in helmrepo-oci reconciler
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny 55573f5eb6 Add progressive status in ocirepo reconciler
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny 9c866ee49d Add progressive status in helmchart reconciler
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny 3d6a5e1203 Add progressive status in helmrepo reconciler
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny ccf0b624a7 Add progressive status in bucket reconciler
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny 887b5309bf Add progressive status in gitrepository reconciler
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
Sunny e253e4c62b reconcile: Add support for progressive status
Replace the patch Helper with SerialPatcher which is used for
progressive status patching.

Update the tests to use progressive status reasons in tests.

Add ProgressingWithRetry Reconciling reason for failed
reconciliation result to indicate a finished failure operation.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-01-10 00:30:40 +05:30
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
Sunny c8feb3ac17
Merge pull request #993 from fluxcd/cleanup-minio-test-container
purge minio test container at the end of tests
2022-12-23 15:09:36 +05:30
Sunny 3a17461777 purge minio test container at the end of tests
Also, add container option to auto-remove a container when stopped, in
case a container is left behind due to some reason.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-12-23 03:46:01 +05:30