Commit Graph

142 Commits

Author SHA1 Message Date
Joe Alagoa 9b1850c908
Merge branch 'main' into bucket-provider-interface 2021-11-08 08:11:38 -06:00
Sunny ede3295bd6 Release v0.17.2
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-11-04 17:19:23 +05:30
Sunny 68a3ea2e4d Add tests for libgit2 remote callbacks
- Adds tests for the libgit2 remote callbacks
- Adds tests for CheckoutStrategyForImplementation with context timeout
  and verify timeout is respected by both the git implementations.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-11-04 16:17:23 +05:30
Joe Alagoa fb6024ed3d
Merge branch 'main' into bucket-provider-interface 2021-11-02 14:55:53 -05:00
Hidde Beydals d98cfaa815 Release v0.17.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-30 11:36:28 +02:00
Hidde Beydals 4d7812ea64 Release v0.17.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-28 15:11:58 +02:00
Sunny f9a34045e1 Update gittestserver
New gittestserver fixes the issue with custom branch in an
initialized repo.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-27 00:43:31 +05:30
Sunny 8c581ddfbc Add git.CheckoutStrategy auth tests
Adds tests for git.CheckoutStrategy to check if both the git
implementations work with all the authentication methods.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-10-27 00:43:31 +05:30
Hidde Beydals 5a1fcc213b git: standardise commit and (PGP) verification
This commit refactors the previous `Commit` interface into a
standardised `Commit` struct. This object contains sufficient
information for referencing, observating and (PGP) verification.

- `libgit2` commit checkout does now return `HEAD/<SHA1>` as
  the branch is not taken into account.
- `git2go` objects are now properly `Free`d everywhere
- `Verify` logic is tested.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-27 00:43:31 +05:30
Joe Alagoa 1930d1d8c8
Merge branch 'main' into bucket-provider-interface 2021-10-22 08:16:43 -05:00
Hidde Beydals bef17ae851 Release v0.16.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-22 14:24:22 +02:00
pa250194 4105490d42 Refactor Bucket Controller
Fix bug in bucket provider interface

Added Bucket Provider Interface

Signed-off-by: pa250194 <pa250194@ncr.com>

Fix context timeout defer issue

Signed-off-by: pa250194 <pa250194@ncr.com>

Fix GCP storage provider test

Signed-off-by: pa250194 <pa250194@ncr.com>
2021-10-21 09:54:48 -05:00
pa250194 5077c1f9f6 Added more tests and cleaned up GCP provider logic
Signed-off-by: pa250194 <pa250194@ncr.com>
2021-10-14 14:26:33 -05:00
pa250194 be1ed50ac4 Service Account Key Authentication to GCP Provider
Signed-off-by: pa250194 <pa250194@ncr.com>
2021-10-14 14:16:53 -05:00
Hidde Beydals 96ab646cd4 Release v0.16.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-14 13:49:52 -05:00
Stefan Prodan 6fe6f07d5e Update containerd and runc to fix CVEs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-14 13:49:52 -05:00
Hidde Beydals 869c7960e3 Update github.com/libgit2/git2go to v31.6.1
This commit updates `github.com/libgit2/git2go` to `v31.6.1` (with
`libgit2` `1.1.1`), and changes the container image build process so
that it makes use of `ghcr.io/hiddeco/golang-with-libgit2`.

This image provides a pre-build dynamic `libgit2` dependency linked
against OpenSSL and LibSSH2 (without gcrypt), and a set of cross-compile
build tools (see
[rationale](https://github.com/hiddeco/golang-with-libgit2#rationale) and
[usage](https://github.co/hiddeco/golang-with-libgit2#usage) for more
detailed information).

The linked set of dependency should solve most known issues around
unsupport private key types, but does not resolve the issues with ECDSA*
and ED25519 hostkeys yet. Solving this requires a newer version of
`libgit2` (`>=1.2.0`), which currently does not seem to work properly
with `git2go/v32`.

Some small changes have been made to the `libgit2` package to address
(future) deprecations.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-14 13:48:15 -05:00
pa250194 6ff5970fe1 Added more tests and cleaned up GCP provider logic
Signed-off-by: pa250194 <pa250194@ncr.com>
2021-09-16 09:49:56 -05:00
pa250194 0444c6e16d Service Account Key Authentication to GCP Provider
Signed-off-by: pa250194 <pa250194@ncr.com>
2021-09-16 09:49:56 -05:00
pa250194 7da9619b58 Feature: Add Support for Google Cloud Storage along with Workload Identity
Added Support for Google Cloud Storage with Workload Identity as Source Provider. This enables the use of GCP without enabling S3 compatible access.

Signed-off-by: pa250194 <pa250194@ncr.com>
2021-09-16 09:49:56 -05:00
Hidde Beydals fd1b3ce0bb Release v0.15.4
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-08-05 13:45:07 +02:00
Hidde Beydals d0560e5dbe Use same SemVer logic in both Git implementations
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-08-05 12:40:54 +02:00
Stefan Prodan 7001b34f10
Update dependencies
- k8s.io/* v0.21.3
- controller-runtime v0.9.5
- kubectl 1.21.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-05 12:43:08 +03:00
Hidde Beydals 5e8e0ab65c Update Helm to v3.6.3
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-07-14 23:24:26 +02:00
Stefan Prodan be9f05baf1
Release v0.15.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-29 12:27:52 +03:00
Hidde Beydals bec2d83c2b Release v0.15.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-22 14:05:36 +02:00
Hidde Beydals 7013af77c5 Release v0.15.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-18 12:54:34 +02:00
Hidde Beydals 1f27410b34 Update Helm to v3.6.1
v3.6.1 is a a security update from Helm, ensuring that credentials are
always only passed to the defined repository host.

Based on Helm user reports, disabling this behavior may be required for
some Helm repository solutions like Artifactory, and may be done by
setting `PassCredentials` in the `HelmRepositorySpec`.

For more information, see:
https://github.com/helm/helm/security/advisories/GHSA-56hp-xqp3-w2jf

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-18 12:31:23 +02:00
Stefan Prodan 50c15b81b3
Release v0.15.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-17 18:51:09 +03:00
Hidde Beydals 2d8a540f0c Unpin docker Go Module dependency
No longer required as we do now depend on Helm v3.6.0, which no longer
pins the version.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-10 16:48:00 +02:00
Hidde Beydals 3c1a27a7c3 Release v0.14.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-08 14:19:05 +02:00
Hidde Beydals a76b10cebb Update K8s, controller-runtime and fluxcd/pkg deps
Controller-runtime has been updated to `v0.9.0`, K8s dependencies to
`v0.21.1`, and all `fluxcd/pkg` and other dependencies to the versions
that have matching dependencies and/or build constraints.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-08 13:41:34 +02:00
Hidde Beydals bbbb3174cd Release v0.13.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-02 12:03:26 +02:00
Hidde Beydals e1682da795 Update go-git to v5.4.2
This should resolve `object not found` and
`empty git-upload-pack given` errors that were thrown for Git
repositories that used to work fine before the `v0.13.0` release.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-02 11:20:23 +02:00
Stefan Prodan b3aa9548ec
Release v0.13.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-28 11:17:27 +03:00
Stefan Prodan 145a82a429
Release v0.13.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 14:45:14 +03:00
Stefan Prodan 4f5b958806
Update libgit2/git2go to v31.4.14
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 14:08:01 +03:00
Stefan Prodan 79b180376d
Update go-git to v5.4.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 14:06:41 +03:00
Hidde Beydals ba5bd31572 Release v0.12.2
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-05-10 16:14:52 +02:00
Hidde Beydals fe995a74bf Release v0.12.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-23 11:35:34 +02:00
Stefan Prodan bd0f1fdd19
Release v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 17:57:50 +03:00
Stefan Prodan cb491c9f10
Update fluxcd/pkg/runtime to v0.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 15:04:16 +03:00
Stefan Prodan 51a62a6043
Update fluxcd/pkg/runtime to v0.10.2
Followup: https://github.com/fluxcd/pkg/pull/96

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-19 15:05:40 +03:00
Stefan Prodan d7c90a533d
Update Helm to v3.5.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-15 11:57:01 +03:00
Hidde Beydals d3bcc6a66b Update Go to 1.16
This commit updates Go to 1.16, a required change because of the use of
`os.WriteFile` in one of the tests introduced by commit
b5004a93bc.

Normally _just_ this would not justify the change, but given the
introduction of breaking changes (and thereby forcing a MINOR update
anyway), and the various file{system, path} improvements introduced in
Go 1.16 like
[`filepath#WalkDir`](https://golang.org/pkg/path/filepath/#WalkDir),
going ahead with this should be fine.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-13 16:35:41 +02:00
Hidde Beydals b5004a93bc Make Storage#Archive file filtering configurable
This commit makes the filtering applied during the archiving
configurable by introducing an optional `ArchiveFileFilter`
callback argument and a `SourceIgnoreFilter` implementation.

`SourceIgnoreFilter` filters out files matching
sourceignore.VCSPatterns and any of the provided patterns.
If an empty gitignore.Pattern slice is given, the matcher is set to
sourceignore.NewDefaultMatcher.

The `GitRepository` now loads the ignore patterns before archiving
the repository contents by calling `sourceignore.LoadIgnorePatterns`
and other helpers. The loading behavior is **breaking** as
`.sourceignore` files in the (subdirectories of the) repository are
now still taken into account if `spec.ignore` for a resource is
defined, overwriting is still possible by creating an overwriting
rule in the `spec.ignore` of the resource.

This change also makes it possible for the `BucketReconciler` to not
configure a callback at all and prevent looking for ignore
matches twice. To finalize the bucket refactor, a change to the
reconciler has been made to look for a `.sourceignore` file in
the root of the bucket to provide an additional way of configuring
(global) exclusions.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-13 15:34:20 +02:00
Stefan Prodan 89c37039fb
Release v0.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-31 17:42:40 +03:00
Stefan Prodan f0016cfad1
Enable self-signed certs for go-git
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-29 13:23:32 +03:00
Hidde Beydals 2c084ba825 Release v0.10.0
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-03-26 13:41:18 +01:00
Stefan Prodan a034c5d955
Set leader election deadline to 30s
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-25 13:43:22 +02:00