Commit Graph

19 Commits

Author SHA1 Message Date
Matheus Pimenta e128d3b795
[RFC-0010] Introduce object-level workload identity for container registry APIs
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-05-07 18:33:59 +01:00
Stefan Prodan cd48373d6c
Update controller-gen to v0.16.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-08-23 13:42:28 +03:00
Hidde Beydals eeef91a4b9
Update controller-runtime (v0.15) and K8s (v1.27)
This deals with various breaking changes in controller-runtime, as
documented in the release notes:
https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0

In short:

- `Watches` now use a `client.Object` instead of a `source.Kind`.
- `handler.MapFunc` signature accepts a Go context, which is used to
  log any errors, instead of silently ignoring them and/or panicking.
- Fake clients used in tests are now configured using
  `WithStatusSubresource` to enable the correct behavior for status
  updates and patches.
- Max concurrent reconciles is configured on the manager, instead of
  configuring them per reconciler instance.
- Various manager configuration options have been moved to new
  structures and/or fields.

In addition to this, all other dependencies which had updates are
updated to their latest (compatible) versions as well.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-05-24 09:05:42 +02:00
Stefan Prodan ca3496e758
Build with Go 1.19
- Update Go to 1.19 in CI
- Use Go 1.19 in base image
- Update controller-gen v0.8.0 and regenerate manifests

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-28 15:35:26 +03:00
Stefan Prodan 46fe7a389c
Add OCIRepository kind to v1beta2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:05 +03:00
Hidde Beydals fda481efe9 Upgrade controller-runtime to v0.7.0
This commit upgrades the `controller-runtime` dependency to `v0.7.0`,
including all changes required to make all wiring work again.

- Upgrade `runtime` to v0.6.0 to include `controller-runtime` changes.
- Loggers have been removed from the reconcilers and are now retrieved
  from the `context.Context` passed to the `Reconcile` method and
  downwards functions.
- Logger configuration flags are now bound to the flag set using
  `BindFlags` from `runtime/logger`, ensuring the same contract across
  GitOps Toolkit controllers, and the `--log-json` flag has been
  deprecated in favour of the `--log-encoding=json` default.
- The `ChangePredicate` from `runtime` has changed to a
  `ReconcilateAtChangedPredicate`, and is now chained with the
  `GenerationChangedPredicate` from `controller-runtime` using
  `predicate.Or`.
- Signatures that made use of `runtime.Object` have changed to
  `client.Object`, removing the requirement to e.g. call
  `runtime.Object#Object`.
- The `client.MatchingField` function was deprecated, and has been
  replaced with `client.MatchingFields{}`.
- The `leader-election-role` was changed, as leader election now works
  via the `coordination/v1` API.

Other notable changes:

- `util.ObjectKey` was added to easily construct a `client.ObjectKey` /
  `types.NamespacedName` from a `metav1.Object`.
- The `SourceIndexKey` constant has been split out into
  `{GitRepository,HelmRepository,Bucket}IndexKey` constants.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-18 19:17:10 +01:00
Stefan Prodan 08d98ff214
Add finalizers to RBAC
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-28 14:39:53 +02:00
stefanprodan 6f8c3816f4 Add secrets read-only access to RBAC 2020-09-18 16:11:28 +03:00
stefanprodan 0e6ae3b769 Add Bucket type to API 2020-09-18 16:11:24 +03:00
Hidde Beydals b5d869db03 Include PATCH rule for events in manager-role
During high custom resource count / low interval tests, I was greated
with a `cannot patch resource "events"` message. This happened due to
event compaction, where it will perform a patch instead of a create.
By giving the role the permission to do so this should no longer pose
a problem.
2020-09-10 21:17:10 +02:00
Hidde Beydals 8e1b213da5 Change CRD domain to 'source.toolkit.fluxcd.io'
Due to required domain changes for the helm-controller so that it
can co-exist in a cluster with the Helm Operator, other Toolkit
components are moving to a *.toolklit.fluxcd.io domain too.
2020-07-30 21:50:46 +02:00
stefanprodan 7ef9218de9 deploy: reusable config 2020-04-24 12:17:33 +03:00
Hidde Beydals 23f0b38ac2 Add helmchart/finalizers RBAC rule for OpenShift 2020-04-13 13:12:41 +02:00
Hidde Beydals d378bd1852 Introduce HelmChart API and controller
- Add the HelmChart types and controller
- Semver expressions are found by utilizing Helm repository index
  helpers. As Helm makes use of `masterminds/semver`, the support
  for i.e. ranges less mature than the `GitRepository` implementation.
- Recorded semver is as defined in the metadata of the chart. The
  used name for the artifact does however include the checksum of the
  chart archive, as chart maintainers may not always properly apply
  semver.
- Switches to `sigs.k8s.io/yaml` for YAML operations as this among
  other things is able to properly unmarshal embedded structures.
- Directly requeues on transient errors instead of using the defined
  interval as a back-off strategy is applied on repeated failures.
2020-04-12 18:44:37 +02:00
Hidde Beydals 4d30a82ef4 Rename project to source-controller 2020-04-08 16:12:17 +03:00
stefanprodan 98901f2909 Expose git artifacts inside the cluster 2020-04-07 10:49:57 +03:00
stefanprodan d2b0653c34 Setup build and deploy manifests 2020-04-06 20:37:53 +03:00
stefanprodan 6b31c57ba7 Add repository status conditions 2020-04-05 15:18:43 +03:00
stefanprodan 92b7b1fe43 Scaffold repository controllers 2020-04-05 12:34:29 +03:00