The previous version would verify git status at time of `make verify` execution, but before all its dependencies executed.
If one of the dependencies resulted in a dirty git, the check would still pass.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
v0.3.0 of gen-crd-api-reference-docs has a bug that leads to it
rendering incorrect links for local types. This is fixed on the master
branch but not released, yet, so I'm pinning the version of the tool
to the latest current commit.
Signed-off-by: Max Jonas Werner <mail@makk.es>
This ensures that no host specific git configuration is pulled in while
testing. One such example would be "init.defaultBranch" which is set to
"main" on some hosts, which then causes tests to fail as they keep looking
for "master" branches.
Signed-off-by: Alexander Block <ablock84@gmail.com>
Expands on the current documentation to help contributors debug the controller
regardless of all its existing dependencies.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
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>
This commit introduces a v1beta2 API package for the staged breaking
changes around conditions and general usage of the API objects.
Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Co-authored-by: Hidde Beydals <hello@hidde.co>
The environment variables set at the Makefile were causing go install to
yield a corrupted file for setup-envtest. To fix the issue, such operation
is now always executed in a clean bash.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
Refactor logic to install helper tools into one function in the
Makefile. Add support for envtest to help install tools like kubectl,
etcd which helps users run tests more conveniently.
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
Adds an initial ATTRIBUTIONS.md file containing the open source
components that source-controller depends on, and their copyright
information.
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
macOS support is broken for users who rely on the Makefile to install
libgit2 for them. libgit2.1.1.dylib could not be dynamically linked at runtime
because it couldn't be found. This patch makes the following changes to
the Makefile:
1) Respects the user's PKG_CONFIG_PATH present in the env so that both
libgit2.pc and openssl.pc are discoverable.
2) Embeds the required rpath in the binary at compile time, so that
libgit2.1.1.dylib can be found at runtime. For more info see:
https://github.com/fluxcd/source-controller/pull/515#discussion_r764245029
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
The version was accidentally set to an invalid version, causing the
API documentation generation to fail.
Signed-off-by: Hidde Beydals <hello@hidde.co>
This moves the `libgit2` compilation to the image, to ensure it
can be build on builders that aren't backed by AMD64.
The image is structured in such a way that e.g. running nightly
builds targeting a different Go version, or targeting a different
OS vendor would be possible in the future via build arguments.
Signed-off-by: Hidde Beydals <hello@hidde.co>
This can be useful on machines where libgit2 is installed due to other
applications depending on it, but where the composition of this
installation does not properly work with the controller.
Reason the system version is still preferred, is because this lowers the
barrier for drive-by contributors, as a working set of (Git) dependencies
should only really be required if you are going to perform work in that
domain.
Signed-off-by: Hidde Beydals <hello@hidde.co>
To provide a better (contributing) experience to those with Apple
machines, as determining the correct paths there is a bit harder.
Signed-off-by: Hidde Beydals <hello@hidde.co>
To allow building a multi-platform container image using `buildx`.
Various configuration flags allow for fine(r)-grain control over the
build process:
- `BASE_IMG`: FQDN of the base image that should be used, without a
tag.
- `BASE_TAG: tag of the base image that should be used. Allows checksum
sum to be included.
- `BUILDX_PLATFORMS`: platforms to target for the final container
image.
- `BUILDX_ARGS`: additional `docker buildx build` arguments, e.g.
`--push` to push the result to a (local) image registry.
Signed-off-by: Hidde Beydals <hello@hidde.co>
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>
Use setup-envtest for installing the binaries required for using
envtest.
The latest envtest binaries for k8s v1.21.2 are not compatible with
kubebuilder < v3, which results in envtest suite test tear down
failure. envtest fails to stop the kube-apiserver.
```
timeout waiting for process kube-apiserver to stop
```
Pin to k8s v1.19.2 envtest binaries that work with kubebuilder v2.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
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>