Commit Graph

1909 Commits

Author SHA1 Message Date
Sanskar Jaiswal c3511cc834 add support for checking out to Git refs
Add a new field `.spec.ref.name` which points to a Git reference which
enables checking out to a particular commit pointed to by the specified
reference.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-02-16 17:33:11 +05:30
Hidde Beydals 1de3b13562
Merge pull request #1028 from fluxcd/update-deps
Update dependencies
2023-02-16 12:37:55 +01: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 7fe19031d7
Merge pull request #1015 from somtochiama/helm-repo-url
Fix: Normalize helm repository url with query params properly
2023-02-15 15:45:47 +01:00
Somtochi Onyekwere 6f0384c50e Normalize path in url
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-02-15 03:54:18 +01:00
Hidde Beydals a8fc26c2a5
Merge pull request #1025 from fluxcd/update-deps
Update dependencies
2023-02-14 17:23:27 +01:00
Hidde Beydals c10f2132d3 crds: update with controller-gen v0.11.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 16:17:48 +01:00
Hidde Beydals 714842e770 Update controller API build tooling
- Update both to their latest versions
- Ensure version variable is actually taken into account again...

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 16:05:26 +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 c4d6b70ccd api: update dependencies
- sigs.k8s.io/controller-runtime to v0.14.4
- Unpin golang.org/x/text from v0.4.0

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 16:04:44 +01:00
Hidde Beydals 2bd0b41da6
Merge pull request #1020 from fluxcd/default-mode-archive-files
Apply default permission mode to all files/dirs in an artifact archive
2023-02-14 15:19:23 +01:00
Max Jonas Werner bfa61d9ed0 Apply default permission mode to all files/dirs in an artifact archive
Files: 0644
Directories: 0755

closes #1019

Signed-off-by: Max Jonas Werner <max@e13.dev>
2023-02-14 14:44:25 +01:00
Hidde Beydals e24ce868d1
Merge pull request #1001 from fluxcd/artifact-digest
RFC-0005: introduction of Digest and change of Revision format
2023-02-14 14:42:21 +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 f53bfd1dc1 Use Artifact.Path for HelmRepository index cache
Resolving it to a local path does not make it more unique, while
resulting in longer keys and a lot of safejoin calls.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals d62f4dc0c6 misc: order imports and align digest aliases
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals eb4a38e421 spec: show RFC-0005 format and digest in examples
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals ccad35971c Allow config using `--artifact-digest-algo`
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals 0aaeeee5e9 controllers: RFC-0005 fmt for HelmRepository rev
This includes changes to the `ChartRepository`, to allow calculating
the revision and digest and tidy things.

In addition, the responsibility of caching the `IndexFile` has been
moved to the reconcilers. As this allowed to remove a lot of
complexities within the `ChartRepository`, and prevented passing on
the cache in general.

Change `HelmRepository`'s Revision to digest

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals f00aeae09a controllers: use TransformLegacyRevision helper
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals eaa4a4ff31 api: introduce TransformLegacyRevision helper
This allows consumers to better handle the transition to the new
RFC-0005 format ("/" -> "@" separation).

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals 469c9387ee controllers: make OCIRepository compat with RFC-0005
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals 909ece4092 helm: use digest lib for checksum calculation
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
Hidde Beydals b89b049bf1 controllers: make HelmChart compat with RFC-0005
This ensures the revision is correctly parsed for `Bucket` and
`GitRepository` sources from which a chart is built, either in the
legacy or new RFC-0005 format.

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 83b6fdcdd8 controllers: use digest for Bucket revision
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-02-14 12:48:36 +01:00
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