Commit Graph

26 Commits

Author SHA1 Message Date
Francesco Giudici 97db17d73b
make linter happy - update copyright dates (#899)
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2025-01-31 15:33:47 +01:00
Andrea Mazzotti cf1a2d6400
Do not include Config to MachineRegistration as pointer (#870)
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-10-17 08:09:41 +02:00
Andrea Mazzotti d280e61748
Implement Enabled field on ManagedOSVersionChannels (#800)
* Implement channel Enabled flag

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-07-30 09:31:02 +02:00
Andrea Mazzotti 0839780db8
Sanitize elemental-operator dependencies (#690)
* Update system-upgrade-controller API

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

* Update Fleet API

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

* Sanitize dependencies

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

---------

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-03-20 15:46:51 +01:00
Andrea Mazzotti 1fc13844fe
Drain nodes by default on upgrade (#660)
* Drain nodes by default on upgrade

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

* Make DrainSpec nullable

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>

---------

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-03-11 14:52:51 +01:00
Fredrik Lönnegren da0776b710 Update copyright year (2024)
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2024-01-05 13:14:27 +01:00
Fredrik Lönnegren b9d1c82976
Copyright date-range 2022 - 2023 (#327)
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-01-13 10:30:48 +01:00
David Cassany Viladomat af83eea27f
Drop legacy catalog for tests (#291)
Signed-off-by: David Cassany <dcassany@suse.com>
2022-12-14 16:35:15 +00:00
Michal Jura f20198f58c Refactor ManagedOsImage e2e tests (#263)
Fix: https://github.com/rancher/elemental-operator/issues/240

Signed-off-by: Michal Jura <mjura@suse.com>

Signed-off-by: Michal Jura <mjura@suse.com>
2022-12-12 12:15:22 +01:00
David Cassany Viladomat d3cefe36eb Add a rate limiter to managedosversionchannel reconciler (#260)
This commit adds a rate limiter to the ManagedOSVersionChannel controller to prevent
stacking reconcile loops over the same resource in fast rates (doesn't make sense for a
ManagedOSVersionChannel). By default the controller runtime already includes an
equivalent rate limiter, but starts in the range of milliseconds, starting the exponential
rate limiter in the range of seconds is more than enough in this context.

In addition it drops the failures counter in the resource. This counter was supposed to
be used to limit the number attempts to sync in case of failure. This was a bad design,
status should not keep a counter like this as any change in status triggers a new
immediate reconcile loop, hence the counter was reaching the maximum as fast as the
controller runtime was executing reconcile loops without any rate limiter (rate limiter
applies only when there are no changes including status).

For now I think we can just live without the setting any maxium for failures. If we ever
need it I believe it should be coded and tracked within the controller itself, not in each
resource as this prevents the reconcile loop of being idempotent. Alternatively we could
prevent triggering the reconcile loop on status changes, however this prevents
reconciling if any third party (or user from the kubectl client) changes a resource status.

Fixes #257
Part of #240

Signed-off-by: David Cassany <dcassany@suse.com>
2022-12-12 12:15:22 +01:00
Michal Jura 0d3c6ef8fd Refactor MachineRegistration e2e tests (#253)
Fixes rancher#240

Signed-off-by: Michal Jura <mjura@suse.com>

Signed-off-by: Michal Jura <mjura@suse.com>
2022-12-12 12:15:22 +01:00
David Cassany Viladomat eeb07166c6 New syncer logic (#245)
* Implement syncer logic as part of the ManagedOSVersionChannel controller

  This commit adds the logic to synchronize managedosversionchannels
  within the already existing controller.

* make generate
* make build-manifests
* Update chart
* update e2e tests

Signed-off-by: David Cassany <dcassany@suse.com>
2022-12-12 12:15:22 +01:00
Alexander Demicev 0edac91853 Add remaining controllers (#232)
* Update vendor

* Run generation tasks

* Minor fixes in Makefile

* Remove old code

* Add remaning controllers

* Minor e2e tests improvements

* Switch osversionchannel syncer to controll runtime

* Minor fixes in controllers

* Fix unit tests
2022-12-12 12:15:22 +01:00
Alexander Demicev 61749bd8c6
Add config for e2e tests (#201)
* Add e2e test config

* Switch to using test config

* Update vendor

* Fix lint issues

* Change rancher namespace variable name

* Put do nothing test back
2022-10-11 13:03:01 +02:00
Itxaka 278b9b2c39
Return a Config.Config in MachineInventory (#35) 2022-07-13 16:28:48 +02:00
David Cassany Viladomat 14d4d957cf
Share installation configuration structures (#24)
This commit makes sure elemental-operator and elemental-installer are
using the same structures to describe and define the elemental-cli
installation.

Signed-off-by: David Cassany <dcassany@suse.com>
2022-07-12 12:36:53 +02:00
Itxaka 7f6baefb2a Restore sync-namespaces
There seems to have some confusion between the namespace of the operator
to run on and the namespaces we want the operator to watch

This restores the sync_namespaces so the operator can watch all
namespaces and sets teh namespace option to be where the operator is
runnig, needed for things like the registration url to be properly
served

Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:13:22 +02:00
Itxaka cc7be89bed Fix rest of the tests, skip one
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:12:19 +02:00
Itxaka 74301fa37b Several fixes
Fix Dockerfile entrypoint
Fix some tests referring to old structs

Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:12:19 +02:00
Ettore Di Giacinto ff7c6d500a
tests: Add upgrades e2e test
The test is trying to run an upgrade on the cluster, checking the logs
of the pod created by system-upgrade-controller which should contain
traces of elemental-cli being called.

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-19 15:21:16 +02:00
Ettore Di Giacinto ed51210e52
Adapt tests, add test cases
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-08 10:47:07 +02:00
Ettore Di Giacinto 601964be5e
Very basic sync service logic
Signed-off-by: David Cassany <dcassany@suse.com>
2022-04-01 17:39:01 +02:00
Ettore Di Giacinto 57c01d6f3b
Refactor common types for metadata
Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-01 12:01:16 +02:00
David Cassany 4e0f1b0cd5
Adds really simple e2e tests for ManagedOSImage controller
Signed-off-by: David Cassany <dcassany@suse.com>
2022-03-31 17:07:31 +02:00
Ettore Di Giacinto 0832fc3823
Move helpers to standalone lib
- Also add nginx as ingress as is more compliant to kind
- Move out some common code pieces
- Address points from review

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-29 17:58:57 +02:00
Ettore Di Giacinto c6fb200f8c
Drop integration tests, add e2e tests with kind
Fixes: https://github.com/rancher-sandbox/rancheros-operator/issues/2
Fixes: https://github.com/rancher-sandbox/rancheros-operator/issues/6

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-28 18:29:06 +02:00