Commit Graph

447 Commits

Author SHA1 Message Date
Sanskar Jaiswal a348d9f394 Upgrade libgit2 and fix static builds
* Bump to golang-with-libgit2:1.1.1.6 to speed up build time when cross compiling. Previous version was compiling in emulation mode instead, which added +10x overhead.
* Ensure that make test is executed against the exact same libraries that will be shipped on the built image.
* Simplify Makefile to reduce its complexity.
* Libgit2 behaviour:
    linux-amd64 download static libraries from the official container image.
    linux-arm64 on top of the above, requires static musl tool chain (automatically downloaded).
    darwin-amd64 and darwin-arm64 download universal static libraries for darwin from https://github.com/fluxcd/golang-with-libgit2 releases.

Co-authored-by: Paulo Gomes <paulo.gomes@weave.works>
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-02-10 16:28:41 +05:30
Stefan Prodan 7aa9f94037
Merge pull request #300 from fluxcd/retire-squaremo
Retire squaremo as a maintainer
2022-02-02 15:13:41 +02:00
Michael Bridgen 3ca9d1da3b Retire squaremo as a maintainer
Signed-Off-By: Michael Bridgen <michael@weave.works>
2022-02-02 10:30:51 +00:00
Stefan Prodan ce4f4ba4d1
Merge pull request #307 from fluxcd/release-v0.20.0
Release v0.20.0
2022-02-01 10:48:19 +02:00
Stefan Prodan b1d4cb3464
Release v0.20.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-01 10:38:11 +02:00
Hidde Beydals 643b9c7009
Merge pull request #303 from pjbgf/bookworm 2022-01-28 15:35:06 +01:00
Paulo Gomes b343008a94
Update test to run against static libraries
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-28 09:35:20 +00:00
Paulo Gomes 01a2eaac8c
Bump source-controller to v0.21.1
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-28 09:35:19 +00:00
Paulo Gomes 3a4fd75d77
Statically build using musl toolchain and target alpine
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-28 09:35:18 +00:00
Paulo Gomes 81680201d1
Add make verify
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-28 09:35:17 +00:00
Paulo Gomes fda7842bf4
Add attributions for dependencies and their license details
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-28 09:35:16 +00:00
Paulo Gomes 68fd60f14d
Migrate to debian:bookworm-slim
This aligns with the final image used by source controller.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-28 09:35:12 +00:00
Stefan Prodan 6aaf01a6ee
Merge pull request #305 from SomtochiAma/no-cross-ns-ref
Allow disabling cross-namespace references
2022-01-28 09:49:16 +02:00
Somtochi Onyekwere 0ca01bd254 Add flag to disable cross-namespace referencing
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-01-28 08:32:21 +01:00
Stefan Prodan 895bb22d2f
Merge pull request #304 from fluxcd/source-controller/api-v0.21.0
Update source-controller packages to 0.21.0
2022-01-26 17:46:21 +02:00
Stefan Prodan 72d0be7c0c
Update source-controller packages to 0.21.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-26 17:18:38 +02:00
Stefan Prodan 3d52b88c02
Merge pull request #288 from fluxcd/kyaml-update
Update kyaml to v0.13.0
2022-01-26 17:08:26 +02:00
Aurel Canciu aa3b6cc4b7
Update kyaml to v0.13.0
Updating kyaml to match the version we use in other components. This
version's most significant change for us would be that kyaml will no
longer override indentations in the targeted files.

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2022-01-26 15:56:25 +01:00
Stefan Prodan e023a12809
Merge pull request #302 from fluxcd/sbom-cosign
Publish SBOM and sign release artifacts
2022-01-26 09:21:52 +02:00
Stefan Prodan 03016c1f35
Publish SBOM and sign release artifacts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-25 15:24:18 +02:00
Stefan Prodan 83b06b4167
Merge pull request #299 from aryan9600/aryan9600/ref-gitrepo-cross-ns
Add support for cross-namespace sourceRef in ImageUpdateAutomation
2022-01-25 14:10:52 +02:00
Sanskar Jaiswal 3de51e7a1e add support for cross-namespace sourceRef in ImageUpdateAutomation
ImageUpdateAutomation objects can now refer to GitRepository objects in other
namespaces. Implemented by switching sourceRef from a SourceReference to a
dependency.CrossNamespaceDependencyReference.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-01-25 14:21:37 +05:30
Stefan Prodan 524b603a72
Merge pull request #301 from yiannistri/dev-docs
Update dev docs
2022-01-24 15:55:34 +02:00
Yiannis d9ef8c673f Update dev docs
Signed-off-by: Yiannis <yiannis.triantafyllopoulos@gmail.com>
2022-01-24 13:33:25 +00:00
Aurel Canciu d53c894917
Merge pull request #277 from sbernheim/default-observed-generation
Set default observedGeneration to -1
2022-01-22 01:21:22 +01:00
Sebastian Bernheim 447a15be23
Set default observedGeneration to -1
Sets a default value of -1 for the observedGeneration field of the
ImageUpdateAutomations type status.observedGeneration attribute.
This ensures that tools like kstatus do not consider the resource to be
in a Ready state prematurely because the generation and
observedGeneration attributes are briefly initialized with 0 values.

Signed-off-by: Sebastian Bernheim <sebastian@weave.works>
2022-01-21 17:56:08 -05:00
Sunny eafce663f2
Merge pull request #285 from au2001/http-auto-proxy-dev
Configure libgit2 fetch and push ProxyOptions
2022-01-21 16:37:11 +05:30
Aurélien GARNIER 9b82e81af0 Use libgit2 auto proxy configuration
Signed-off-by: Aurélien GARNIER <aurelien.garnier@atos.net>
2022-01-20 17:14:18 +01:00
Stefan Prodan aa7a24ee85
Merge pull request #295 from aryan9600/aryan9600/security-context
Drop capabilities, enable seccomp and enforce runAsNonRoot
2022-01-20 08:53:59 +02:00
Sanskar Jaiswal 888b39a6eb drop capabilities, enable seccomp and enforce runAsNonRoot
Further restricts the SecurityContext that the controller runs under, by enabling the default seccomp profile and dropping all linux capabilities.
This was set at container-level to ensure backwards compatibility with use cases in which sidecars are injected into the source-controller pod
without setting less restrictive settings.
Add a uid and gid for the container to enforce runAsNonRoot and ensure
the use of non root users.

BREAKING CHANGES:
1) The use of new seccomp API requires Kubernetes 1.19.
2) the controller container is now executed under 65534:65534 (userid:groupid).
   This change may break deployments that hard-coded the user name 'controller' in their PodSecurityPolicy.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
Co-authored-by: Paulo Gomes <paulo.gomes@weave.works>
2022-01-19 23:18:00 +05:30
Stefan Prodan 7b59de6e7a
Merge pull request #292 from aryan9600/aryan9600/setup-testenv
Fix makefile envtest and controller-gen usage
2022-01-13 13:45:45 +02:00
Sanskar Jaiswal 942e980616 fix makefile envtest and controller-gen usage
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 <jaiswalsanskar078@gmail.com>
2022-01-13 16:46:12 +05:30
Hidde Beydals 7e0fa85a72
Merge pull request #283 from Nalum/issue-246 2022-01-11 16:44:31 +01:00
Luke Mallon (Nalum) c026e67484
[refactor] Check for a nil lastTime before use
Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>
2022-01-11 12:31:02 +00:00
Stefan Prodan 38570b4217
Merge pull request #290 from jonathan-innis/fix-makefile-spaces
Fix Indentation of Makefile
2022-01-11 10:51:43 +02:00
Jonathan Innis b64a982c09 Convert makefile spaces to tabs for linux envs
Signed-off-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
2022-01-10 13:54:04 -08:00
Stefan Prodan 30f26894b8
Merge pull request #289 from fluxcd/release-v0.19.0
Release v0.19.0
2022-01-07 18:52:44 +02:00
Stefan Prodan fe703fc521
Release v0.19.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-07 18:26:31 +02:00
Stefan Prodan 7991d734da
Merge pull request #248 from fluxcd/go-v1.17
Update Go to v1.17
2022-01-07 18:16:41 +02:00
Aurel Canciu 24594ebf20
Update flux pkg components
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2022-01-07 16:53:29 +01:00
Aurel Canciu 8312c64e93
Update Go to v1.17
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2022-01-06 12:19:46 +01:00
Michael Bridgen 90dcdfd7a3
Merge pull request #287 from fluxcd/log-when-rmall
Log the error when removing the working dir fails
2022-01-06 10:06:41 +00:00
Michael Bridgen 8e1f31fe12 Log the error when removing the working dir fails
os.RemoveAll can return an error; even if we're exiting the procedure
at the time, it's worth knowing when it's failing, because typically
the working directory is a memory-backed volume and you can run out
quite easily.

Signed-off-by: Michael Bridgen <michael@weave.works>
2022-01-05 17:55:06 +00:00
Stefan Prodan f82654d00f
Merge pull request #284 from Nalum/issue-245
Move Path check into switch case
2021-12-22 15:12:16 +02:00
Luke Mallon (Nalum) f75315e44d
[refactor] Remove else as redundant in this use
Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>
2021-12-21 15:58:58 +00:00
Luke Mallon (Nalum) 864ad1182e
[refactor] Move Path check into switch case
Signed-off-by: Luke Mallon (Nalum) <luke@mallon.ie>
2021-12-20 16:20:21 +00:00
Stefan Prodan b19e3e98d3
Merge pull request #280 from kingdonb/fixup-broken-link
Fix broken link in README
2021-12-16 09:23:07 +02:00
Kingdon Barrett a863fd08c0
Fix broken link in README
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2021-12-15 16:12:56 -05:00
Stefan Prodan 1419bcf33f
Merge pull request #278 from aryan9600/main
Fix potentially broken support for macOS
2021-12-13 17:43:31 +02:00
Sanskar Jaiswal 23a0217cae fix potentially broken support for macOS
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 <jaiswalsanskar078@gmail.com>
2021-12-13 16:35:16 +05:30