Commit Graph

39 Commits

Author SHA1 Message Date
Alexander Demicev 8283d03496
Kubebuilder: Remove unused code (#267)
* Remove unused code

* Run make vendor
2022-11-29 12:29:55 +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
David Cassany Viladomat cdf406ef81
Allow custom config files for elemental-cli (#210)
* Allow custom config files for elemental-cli
* Update vendor folder

Signed-off-by: David Cassany <dcassany@suse.com>
2022-10-14 10:42:13 +02: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
Francesco Giudici a4ad41f377 go mod tidy
let's do a bit of clean-up on modules.

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2022-09-05 10:59:18 +02:00
Francesco Giudici b22f183d5b bump github.com/rancher-sandbox/go-tpm
get the latest and gratest:

d273b29 tpm: add single step functions to perform attestation
baef878 Merge pull request #3 from fgiudici/status_in_dial_error
30058b5 Include more info in the error msg on Dial() error
a02dabe Merge pull request #4 from fgiudici/lint_add_comment
eab8ac2 Make the linter happy (add a comment)
89d72d3 Add EmulatedHostSeed option

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2022-08-31 16:09:20 +02:00
Francesco Giudici ca0426e7d8 add github.com/sanity-io/litter module
The module will be soon used to dump some more debugging data

go get -d github.com/sanity-io/litter

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2022-07-22 18:07:18 +02:00
Itxaka e87eb80c9c
Use cacert from rancher and use serverl-url from rancher (#36)
* Generate v3.Setting code

Signed-off-by: Itxaka <igarcia@suse.com>

* Use the rancher cacerts for the registration

Also drops the cacert passing via chart, adds proper permissions to the
settings resource, adds the cache index and checks that indeed we are
returning a cacert on the registration url

Signed-off-by: Itxaka <igarcia@suse.com>

* fix lint

Signed-off-by: Itxaka <igarcia@suse.com>

* Drop manual rancherl-url and get the rancher url automatically

Drop any manual setup of rancher-url and use the settings to get the set
rancher-url

Signed-off-by: Itxaka <igarcia@suse.com>

* Small fix for getRancherCACert

Signed-off-by: Itxaka <igarcia@suse.com>

* Fix test setting the wrong url

Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-13 16:11:21 +02:00
Itxaka d71332ae2a
bump github.com/docker/distribution to 2.8.1 (#29)
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 22:14:07 +02:00
Itxaka 5b8e9cc871
Bump image-spec to 1.0.2 (#28)
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 19:28:27 +02:00
Itxaka be489f1a6e
Bump system-agent to 0.2.8 (#17) 2022-07-11 15:36:59 +00:00
Itxaka 7eee3ca2de update testhelpers
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:38:30 +02:00
Itxaka 719b3aa147 Update go.sum
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:28:27 +02:00
Itxaka 552a72602e Fix go.sum
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:23:28 +02:00
Itxaka 0231b1d913 Fix go.sum
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:17:28 +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 5c5f1150cb Fix all the test, remove leftovers from transition
Remove all the mentions to rancheros-operator in tests, imports and
dependencies.

Restore e2e scripts and test targets on makefile

Fix all lint issues

Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:12:19 +02:00
Ettore Di Giacinto ccf4bbb035
Bump yip dependency (#19)
Signed-off-by: Ettore Di Giacinto <edigacinto@suse.com>
2022-07-08 10:27:01 +02:00
David Cassany Viladomat 1d97f14de7
Merge elemental installer (#20)
* Move main into a cmd/operator package
* Add elemental-installer
* Adding installer unit tests
* Update Makefile
* Update .github/workflows/unit-tests.yaml
* Adapat Dockerfile and golreleaser to keep releasing and building elemental-operator as they used to

Signed-off-by: David Cassany <dcassany@suse.com>
Co-authored-by: Itxaka <igarcia@suse.com>
2022-07-07 14:47:32 +02:00
Jacob Payne c5a5dbd77f renamed to elemental-operator and switched to system agent 2022-06-30 16:01:13 +00:00
Ettore Di Giacinto 2acf273ba5
tests: Use helpers from testlib
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-20 09:43:36 +02:00
Loic Devulder 2a02548f48
Bump ele-testhelpers version
Signed-off-by: Loic Devulder <ldevulder@suse.com>
2022-04-08 17:01:38 +02:00
Ettore Di Giacinto d2c03b4682
Refactor out requeuer to not be blocking
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-07 16:00:24 +02:00
Ettore Di Giacinto f17af166c6
Add test for event broadcasting
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-07 16:00:24 +02:00
Ettore Di Giacinto e3488f833b
Implement Custom syncer
At the moment is collecting json output from logs for creating API data
and it's not a real controller. This will be fixed in a follow up.
Besides, relying on logging as we are doing it now, even with the
initContainer workaround is not correct as we
do not have guarantee from kubelet to store logs for us, so this is good
only for small amount of data.

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-06 11:37:45 +02:00
David Cassany 477acd31e2
Implement JSON syncer logic
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Co-authored-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-04 10:17:45 +02:00
David Cassany f228728ce7
Add basic ManagedOSVersion type
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-30 15:50:25 +02:00
Ettore Di Giacinto 8578a8a0c4
Allow to reuse the same cluster
This is particularly useful for local iteration

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-30 13:55:11 +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
Itxaka a5275b3629 Fix unit-tests so they run and get coverage
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:09:01 +01:00
Itxaka 26684d1888 Drop everything not needed for ros-operator
- Drops everything not needed for ros-operator
 - New simple Dockerfile
 - New jobs based on ros-operator only
 - Remove uneeded tests
 - Remove dependency on os2 images for integration tests
 - Use gorelease to release ros-operator binaries
 - Use docker to push ci images to ros-operator-ci registry on PR
 - Use docker to push master/tag images to ros-operator registry
 - Build chart indepently
 - Have a null test CI job for future integration tests

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 09:47:18 +01:00
Ettore Di Giacinto b1331abb2a
Add upgradeContainerSpec to ManagedOS and update wrangler (#66)
* Allow to specify a upgradeContainerSpec on ManagedOS

https://github.com/rancher-sandbox/os2/issues/59

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Run go generate and update wrangler

Also pin golang.org/x/tools to latest, to workaround
https://github.com/golang/go/issues/37617

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Update docs

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Adapt to new wrangler signal context

9460166aed

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>

* Fixup license headers

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-03-23 18:27:39 +01:00
Ettore Di Giacinto 6d9449824a
Consume go-tpm in place of tpm in rancherd/os2
Part of #20. Will allow later on to set an emulated device.

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-02-17 14:41:32 +01:00
Ettore Di Giacinto d99fca748a
Handle ENV var prefix rename, add tests for read config
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-01-31 16:53:16 +01:00
Darren Shepherd 901973e5f6 Add TPM and MachineRegister support 2021-10-29 23:08:26 -07:00
Darren Shepherd 5675644d9f Add operator 2021-10-20 10:58:54 -07:00
Darren Shepherd 0e46d19194 Add ipxe support 2021-10-13 16:01:08 -07:00
Darren Shepherd 3040e886dc Refactor build 2021-10-02 16:08:48 -07:00