Commit Graph

4 Commits

Author SHA1 Message Date
Francesco Giudici 5df274078b
[controller_runtime] operator/registration: switch to Kubebuilder client (#256)
* operator/registration: switch to Kubebuilder client

Fixes #239

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

* operator/registration: adapt tests to Kubebuilder client

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

* unit-tests: vendor controller-runtime fake client

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

* operator: add yaml annotations for correct marshalling

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

* operator/RBAC: add "get" verb to ServiceAccount resources

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

* operator: generate rbac

make generate-manifests
make build-rbac

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

* Add elementalcli package

Create a separate package to deal with elemental-cli installation.
This brings the elemental-cli functions declared in the config package
to a new package that just parses a map[string]interface argument.

This is a step to enable usage of the elemental-cli functions with the
new elementalv1.Config.Elemental.Install type.

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

* register: switch to Kubebuilder api

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

* register: add mapstructure annotations for correct marshalling

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

* register: reduce complexity of the run function

Make linter happy:
"cyclomatic complexity 16 of func `run` is high (> 15) (gocyclo)"

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

* register: drop io/ioutil in favor of os package

io/ioutil is deprecated

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

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2022-11-28 17:34:47 +01:00
Francesco Giudici 7b3a13dd7a
controller: add Secret name reference to the ServiceAccount (#247)
Otherwise we will have no Secrets in the ServiceAccount for kubernetes
clusters >= 1.24

Fixes: #246

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2022-11-15 11:04:45 +01:00
Alexander Demicev db7d0dd68e
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-11-10 11:26:34 +01:00
Alexander Demicev 0fde15069d Kubebuilder: Add machine registration controller (#206)
* 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
2022-10-27 12:28:55 +02:00