Commit Graph

148 Commits

Author SHA1 Message Date
Stefan Prodan 06e91e047b
Refactor: Use impersonation from `fluxcd/pkg/runtime/client`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-07 17:36:41 +03:00
Stefan Prodan fc7d9dfb77
Update dependencies
- k8s.io/* v0.25.2
- sigs.k8s.io/controller-runtime v0.13.0
- fluxcd/pkg/runtime v0.19.0
- aws/aws-sdk-go-v2 v1.16.16
- hashicorp/vault/api v1.8.0
- fluxcd/source-controller/api v0.30.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-29 19:15:31 +03:00
Stefan Prodan 21d02283ec
api: add custom validation for v1.Duration types
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-20 11:56:09 +03:00
Somtochi Onyekwere 8046c86a6a Update controller-runtime
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-09-01 17:11:50 +01:00
Stefan Prodan ac10ca5ba4
Update Kubernetes packages to v1.25.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-29 12:33:53 +03:00
Stefan Prodan 3708bc74ac
Update dependencies
- k8s.io/* v0.24.3
- github.com/aws/aws-sdk-go v1.44.70
- sigs.k8s.io/cli-utils v0.32.0
- sigs.k8s.io/kustomize/api v0.12.1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 18:56:37 +03:00
Stefan Prodan a7d790f1b2
Add support for OCIRepository sources
- allow `OCIRepository` to be specified in `sourceRef.kind`
- react to `OCIRepository` artifacts events
- add end-to-end test for OCI repositories

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 18:26:03 +03:00
Paulo Gomes 4f00c552d9
build: Upgrade to Go 1.18
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-06 17:06:01 +01:00
Paulo Gomes 2e17fbab77
Update dependencies
- github.com/aws/aws-sdk-go to version 1.44.46.
- github.com/aws/aws-sdk-go-v2 to version 1.16.6.
- github.com/aws/aws-sdk-go-v2/config to version 1.15.12.
- github.com/aws/aws-sdk-go-v2/credentials to version 1.12.7.
- github.com/aws/aws-sdk-go-v2/service/kms to version 1.17.4.
- github.com/aws/aws-sdk-go-v2/service/sts to version 1.16.8.
- github.com/hashicorp/vault/api to version 1.7.2.
- golang.org/x/net to version 0.0.0-20220630215102-69896b714898.
- google.golang.org/api to version 0.86.0.
- google.golang.org/genproto to version 0.0.0-20220630174209-ad1d48641aa7.
- gopkg.in/yaml.v3 to version 3.0.1.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-07-01 13:27:50 +01:00
Stefan Prodan 55356425fc
Update fluxcd/pkg dependencies
- fluxcd/pkg/apis/kustomize v0.4.2
- fluxcd/pkg/apis/meta v0.14.2
- fluxcd/pkg/kustomize v0.5.2
- fluxcd/pkg/runtime v0.16.2
- fluxcd/pkg/ssa v0.17.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-08 13:44:29 +03:00
Stefan Prodan ab667bffda
Update dependencies
- k8s.io/* v0.24.1
- aws-sdk-go v1.44.28
- vault/api v1.6.0
- source-controller/api v0.25.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-06-07 16:34:14 +03:00
Stefan Prodan adbfaf7b7d
Update go-yaml to v3.0.0
Fix CVE-2022-28948

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-26 16:07:37 +03:00
Stefan Prodan e7a34238a6
Update dependencies
- fluxcd/pkg/apis/meta v0.14.0
- fluxcd/pkg/runtime v0.16.0
- fluxcd/pkg/ssa v0.16.0
- k8s.io/* v0.24.0

Note that fluxcd/pkg/runtime v0.16 comes with support for Kubernetes API Priority and Fairness feature.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-11 18:41:59 +03:00
Nick Stogner 6aeff8c924 Support defining a KubeConfig Secret data key
Signed-off-by: Nick Stogner <nicholas.stogner@gmail.com>
2022-04-29 10:04:14 -04:00
Hidde Beydals 14996311be api: update dependencies
- github.com/fluxcd/pkg/apis/kustomize to v0.3.3
- github.com/fluxcd/pkg/apis/meta to v0.12.2
- k8s.io/apiextensions-apiserver to v0.23.5
- k8s.io/apimachinery to v0.23.5
- sigs.k8s.io/controller-runtime to v0.11.2

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-04-15 16:28:46 +02:00
Paulo Gomes d0069707e0
Update KubeConfig documentation
When the flag --default-service-account was added it changed
slightly the behaviour of the spec.KubeConfig field. It forces
the impersonation to always take place, either via the contents
of spec.ServiceAccountName or its fallback at controller level.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-04-04 16:20:19 +01:00
Stefan Prodan ff7848a2e5
Run tidy compat before Go test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-21 13:07:46 +02:00
Hidde Beydals 592a23fd0e api: update dependencies
- github.com/fluxcd/pkg/apis/kustomize to v0.3.2
- k8s.io/apiextensions-apiserver to v0.23.4
- k8s.io/apimachinery to v0.23.4

Kubernetes dependencies have been updated to `v0.23.4` due to
(apparent) release issues with `v0.23.5`, leaving some of the
submodules unpublished (for at least `k8s.io/apiextensions-apiserver`).

Ref: https://github.com/kubernetes/kubernetes/issues/108763

Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-18 14:09:00 +01:00
Hidde Beydals 855d57c491 Use new standardized meta and runtime pkgs
This includes an update of the source-controller to v0.22.0, to pull in
the v1beta2 API which makes use of the same packages.

Co-authored-by: Sunny <darkowlzz@protonmail.com>
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-03-18 12:04:39 +01:00
Stefan Prodan d56695a93b
Allow shared ownership of in-cluster objects applied with kubectl
Introduce an annotation that configures kustomize-controller to co-manage objects applied with kubectl.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-04 12:37:30 +02:00
Sunny 869ef77fdf
api: Move Status in CRD printcolumn to the end
Status content could be very long compare to other fields. Moving it to
the end helps improve the visibility of other fields.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-02-25 15:23:46 +02:00
Stefan Prodan 55ebe211ed
Convert `stringData` to `data` before applying Secrets
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-22 17:54:33 +02:00
Steven E. Harris eba4168672
Tolerate absence of resources in post-build subst.
In a Kustomization's post-build substitution sources, introduce a new
"Optional" field to allow referencing a Kubernetes ConfigMap or Secret
that may not exist at time of reconciliation. Treat substitution when
the referenced object is missing as if the object had been present but
empty, lacking any variable bindings.

Retain the longstanding behavior of interpreting references to
Kubernetes objects being mandatory by default, such that
reconciliation fails if such a referenced object does not exist. Only
when the "Optional" field is set to true will reconciliation tolerate
finding the referenced object to be missing.

Signed-off-by: Steven E. Harris <seh@panix.com>
2022-02-15 09:27:41 -05:00
Stefan Prodan 518c8a021b
Allow disabling cross-namespace references
Introduce the flag `--no-cross-namespace-refs` (defaults to false) for allowing cluster admins to disable cross-namespace references to sources.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-26 22:50:10 +02:00
Aurel Canciu ec9fdb1550
Update flux pkg components
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-12-20 14:50:41 +01:00
Aurel Canciu 57220f8c70
Update Go to v1.17
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2021-12-16 14:23:15 +01:00
Stefan Prodan 24bdda0c1c
Update dependencies
- fluxcd/pkg/ssa v0.6.0
- fluxcd/source-controller/api v0.19.1
- github.com/opencontainers/runc to v1.0.3 (fix CVE-2021-43784)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-09 11:47:50 +02:00
Stefan Prodan 8eac59574f
Release v0.17.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-09 14:18:49 +02:00
Stefan Prodan 51a7189087
Restore `spec.validation` and mark it as deprecated
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 14:17:02 +03:00
Stefan Prodan dba56a569e
Add example for `.spec.wait` usage
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-07 11:37:39 +03:00
Stefan Prodan 6346591f02
Use ssa package from fluxcd/pkg
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-01 10:21:15 +03:00
Stefan Prodan 9c8f284b7f
Add `spec.wait` usage to the API docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:40 +03:00
Stefan Prodan 468f00e416
Implement health checking for all resources
- Add `.spec.wait` optional boolean field to API
- Wait for all applied resources to become ready when `.spec.wait` is set to `true`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 69069c3ab3
Refactor reconciliation into actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan b33e3b3449
Update the status when health checking starts
Set the healthiness status to progressing and specify the health check timeout in the condition message.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:35:39 +03:00
Stefan Prodan 7ffe62b8e7
Introduce v1beta2 API
Changes from v1beta1:
- `spec.validation` removed (server-side validation is implicit)
- `spec.status.snapshot` replaced by `spec.status.inventory`
- `spec.patchesStrategicMerge` deprecated in favour of `spec.patches`
- `spec.patchesJson6902` deprecated in favour of `spec.patches`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 18:33:26 +03:00
Stefan Prodan 14329c6fa0
Refactor tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-10 16:51:22 +03:00
Max Jonas Werner d7690d8564
feat: set default observedGeneration to -1 on Kustomizations
This is a follow-up to
https://github.com/fluxcd/helm-controller/pull/294, porting the same
code to the kustomize-controller so that all Flux 2 controllers work
the same way in this regard.

Signed-off-by: Max Jonas Werner <mail@makk.es>
2021-08-27 17:15:24 +02:00
James Alseth 6f32e53970
Improve trimString function
Previously, the function iterated until the length limit was hit, which
is relatively slow and increases with the length of the limit. The new
implementation is easier to reason about and operates in constant time,
leading to better performance.

Signed-off-by: James Alseth <james@jalseth.me>
2021-08-24 19:18:41 -07:00
Stefan Prodan fe0f946840
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 10:45:32 +03:00
Stefan Prodan 2370360c10
Add the generic patch field to the API spec docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-18 10:42:34 +03:00
Guillaume Le Biller 14bce3c666
Update pkg/apis/kustomize to v0.2.0
Signed-off-by: Guillaume Le Biller <glebiller@Traveldoo.com>
2021-06-11 16:45:50 +02:00
Guillaume Le Biller b797eac907
Implement generic patches in Kustomization
Allow patching multiple resources instead of a single existing one as
StrategicMerge & JSON6902 are forced to target existing named resources.

Signed-off-by: Guillaume Le Biller <glebiller@Traveldoo.com>
2021-06-11 09:04:37 +02:00
Stefan Prodan ce4445f714
Update fluxcd/pkg/runtime to v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:33 +03:00
Stefan Prodan dce166f7a6
Update controller-runtime and controller-gen
- Bump controller-runtime to v0.9.0
- Bump controller-gen to v0.5.0
- Use Environment.AddUser to generate the envtest cluster admin kubeconfig

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 20:34:16 +03:00
Stefan Prodan 3bb5bece0c
Update source-controller/api to v0.13.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 16:46:11 +03:00
Stefan Prodan 036e3cf42b
Update fluxcd/source-controller/api to v0.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-22 10:40:17 +03:00
Stefan Prodan 56a1fab4c2
Update fluxcd/pkg/apis/meta to v0.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-21 13:41:34 +03:00
Stefan Prodan aa66416734
Update fluxcd/pkg/runtime to v0.10.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-19 15:03:00 +03:00
Stefan Prodan 43c05a7a20
Set leader election deadline to 30s
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-25 13:33:15 +02:00