Commit Graph

28 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 6372ec6706
Only reset network if a network configurator is used (#874)
* Only reset network if a network configurator is used

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-10-22 14:56:33 +02:00
Andrea Mazzotti 342bba265c
IPAM to nmstate network config (#793)
* operator: introduce support to IPAM assigned IP address

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>

* Add nmstate support

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

---------

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Co-authored-by: Francesco Giudici <francesco.giudici@suse.com>
2024-08-09 10:32:19 +02:00
Rhys Oxenham 7c71dc9de1
Added the ability to create a node reset marker for unmanaged hosts (#731)
* Added the ability to create a node reset marker for unmanaged hosts
2024-05-21 16:15:38 +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 6d7b1f57b0
Use /run/elemental and elemental- services (#675)
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-03-14 10:49:24 +01:00
Fredrik Lönnegren 7878dd43af Use rancher/yip v1.4.10
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2024-02-15 11:43:14 +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
David Cassany 662d618a01 Improve update events filtering to actually ignore status updates
Signed-off-by: David Cassany <dcassany@suse.com>
2023-10-03 19:02:18 +02:00
David Cassany 8393423c8a Run all syncers in a pod
This commit moves the synchronization logic to allways happen in a Pod,
regardless being a Custom or JSON syncer. This allows having a simpler Pod
lifecycle management as part of the channel controller logic.

In addition, syncer pod logs are read on succeeded state instate of
running state to simplify Pod lifecycle management.

As a result channel updates trigger a new channel synchronization
without having to wait for the next scheduled sync.

Signed-off-by: David Cassany <dcassany@suse.com>
2023-10-03 14:47:12 +02:00
Steven a393a1387c register: add os.unmanaged inventory annotation
When hosts are registered with the --no-toolkit option no OS management
is possible, so we set a new os.unmanaged annotation to reflect this
and skip any attempt to reset if this is found.
2023-09-20 10:35:22 +02:00
Andrea Mazzotti ce586baff2
Use elemental-register-reset service (#502) 2023-08-30 11:23:10 +02:00
Andrea Mazzotti ffb9c010c4
Implement remote machines reset (#489) 2023-08-04 09:34:26 +02:00
David Cassany 24a5fdd972 Recreate service account token secret if missing
This commit checks on each reconcile loop if the service
account token secret is missing despite being on ready
state.

In addition it also adds optimistic locking for patch calls. The
motivations is to prevent concurrent controllers to modify
outdated data.

Signed-off-by: David Cassany <dcassany@suse.com>
2023-07-24 09:46:26 +02:00
David Cassany 42314f4382 Fix elemental managed label value to match backup operator expectations
Signed-off-by: David Cassany <dcassany@suse.com>
2023-07-11 17:06:37 +02:00
David Cassany 81e4228400 Fix event filters
Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-29 15:24:17 +02:00
David Cassany 97e784eb4d Selector and inventory cleanup
Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-28 13:04:03 +02:00
David Cassany cb574e4ad8 Adapt info and debug logging for the inventory and selector controllers
Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-28 13:04:03 +02:00
David Cassany 676e68450d Sets a validation process for Machine Inventory adoption
Machine inventory selectors are all competing to adopt
a machine inventory resource. In order to avoid a machine
inventory being adopted by more than one selector or viceversa
this commit adds a validation process and tracks its status
in a new adoption condition for the inventory resource.

The validation process is simple: on one side the machine
inventory checks its owner includes the appropriate reference;
on the other side the selector checks the reference in status
points to a machine inventory owned by itself.

If an inconsistency is found during the validation the adoption
process restarts. The bootstrap plan is not created until the
adoption process is validated.

Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-28 13:04:03 +02:00
Francesco Giudici 52637a0c9d
operator: ensure elemental finalizers are removed if present (#393)
We have removed finalizers from MachineInventories and MachineRegistrations.
Still if we upgrade from older operator versions, we may inherit old resources with the finalizers set there. In this case, when the "old" resources get deleted, no one will remove the finalizers preventing their actual deletion.
Ensure the finalizers are cleaned up if there when the resource is deleted.

Fixes https://github.com/rancher/elemental-operator/issues/391

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-03-17 15:17:04 +01:00
David Cassany 337354078b Stop using finalizers if not extrictly needed
Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-14 15:48:49 +01:00
David Cassany a226ad19ae Set object not found as a debug message
Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-09 11:29:01 +01:00
David Cassany 4729e3be9e Update logs to not use info with custom depth
Signed-off-by: David Cassany <dcassany@suse.com>
2023-03-09 11:29:01 +01:00
Fredrik Lönnegren 46b4e2f9a8
Turn MachineInventoryRef into LocalObjectReference (#359)
* Turn MachineInventoryRef into LocalObjectReference

Make the MachineInventorySelector reference to an owned
MachineInventory a LocalObjectReference, since a resource cannot
own another resource in a different namespace.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Fix typo

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

---------

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-02-15 20:42:15 +00: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
Alexander Demicev ebca28f734
Remove invalid conditions from objects (#284) 2022-12-12 14:14:50 +00: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 eca526f5ca Kubebuilder: Add machine inventory controller (#221)
* Add machine inventory controller

* Remove old code

* Add managed label to created secret
2022-12-12 12:15:22 +01:00