* 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>
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>
this allows to fix sporadic issues with unit tests:
createRBACObjects
should successfully create RBAC objects
/home/fgiudici/go/src/github.com/rancher/elemental-operator/controllers/machineregistration_controller_test.go:202
1.6788283160593388e+09 INFO Reconciling RBAC resources
1.6788283160594149e+09 INFO Creating role
1.6788283160648215e+09 INFO Creating service account
1.6788283160696208e+09 INFO Creating token secret for the service
account
1.6788283160727391e+09 INFO Creating role binding
1.678828316076215e+09 INFO Setting service account ref
------------------------------
• [FAILED] [0.090 seconds]
createRBACObjects
/home/fgiudici/go/src/github.com/rancher/elemental-operator/controllers/machineregistration_controller_test.go:158
[It] should successfully create RBAC objects
/home/fgiudici/go/src/github.com/rancher/elemental-operator/controllers/machineregistration_controller_test.go:202
Begin Captured GinkgoWriter Output >>
1.6788283160593388e+09 INFO Reconciling RBAC resources
1.6788283160594149e+09 INFO Creating role
1.6788283160648215e+09 INFO Creating service account
1.6788283160696208e+09 INFO Creating token secret for the
service account
1.6788283160727391e+09 INFO Creating role binding
1.678828316076215e+09 INFO Setting service account ref
<< End Captured GinkgoWriter Output
Expected
<types.UID>: dabb952e-aced-466f-9a98-555675dbd66f
to equal
<types.UID>: testuid
In [It] at:
/home/fgiudici/go/src/github.com/rancher/elemental-operator/controllers/machineregistration_controller_test.go:212
Full Stack Trace
github.com/rancher/elemental-operator/controllers.glob..func6.3()
/home/fgiudici/go/src/github.com/rancher/elemental-operator/controllers/machineregistration_controller_test.go:212
+0x8b3
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* 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>
* Add new package to Dockerfile
* Update dependencies
* Add unit test helpers
* Add new machine registration controller
* Remove old machine registration controller
* Add rbac tag for secrets
* Fix container argument in chart
* Add labels to all created resources