Commit Graph

67 Commits

Author SHA1 Message Date
Alexander Demicev aee446d309
Kubebuilder: Add "verify" workflow (#244)
* Add new verify tasks

* Fix go mod
2022-11-11 14:37:03 +01:00
Alexander Demicev 03988e1ef8 Kubebuilder: Add make tasks for different tools (#194)
* Add tools binaries to Makefile

* Run make generate

* Update github workflows

* Impove path to tools
2022-10-27 12:27:27 +02:00
Itxaka e394356498
Fix docker and gorelease jobs (#230) 2022-10-25 16:17:52 +02:00
Itxaka 4dc57ca988
tests: Add k8s 1.24 and default to rancher 2.6.9 (#220) 2022-10-19 17:22:32 +02:00
Itxaka 2e2b5a2034
tests: use latest url for rancher charts (#218) 2022-10-19 15:57:51 +02:00
Alexander Demicev 9c1d506fa9
Collect operator logs after running tests (#204) 2022-10-11 17:26:10 +02:00
Itxaka 0253a89df6
release: enhance release pipeline (#195)
- publish only binaries instead of a tar.gz of the binaries bundle
 - create SBOM as part of the gorelease pipeline
 - use github changelog for the release
 - sign ALL the things. Binaries, checksum, and even the SBOM
 - release also the cert+sig of the generated artifacts

Signed-off-by: Itxaka <igarcia@suse.com>
2022-10-07 15:26:46 +02:00
Itxaka 270236168b
Disable CGO under arm for register binaries + restore SBOM (#193) 2022-10-04 15:43:09 +02:00
Itxaka 4816d7b41e
Revert "Add sbom to releases and attach to containers" (#191) 2022-10-04 09:32:50 +02:00
Itxaka 846c61040e
Add sbom to releases and attach to containers (#160) 2022-09-12 15:19:10 +02:00
Itxaka 3257003185
tests(inventory): Add unit tests for inventory methods (#164) 2022-09-06 11:21:14 +02:00
Itxaka 14ddce512d
Fix missing cosign and run command (#151) 2022-08-31 19:01:32 +02:00
Itxaka 41e9c17915
Enable deploying operator replicas (#150)
Enables deploying multiple operators replicas.

Changes tests to account and test this

Chart changes:
 - Make any fixed names default to the release name. As release name has
   to be unique per namespace, this is a good practice instead of
   hardcoding whatever name we want. This shouldnt affect anything as
   the full chart uses that by default now.

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

Signed-off-by: Itxaka <igarcia@suse.com>
2022-08-31 16:36:56 +02:00
Itxaka 7e586796fd
Add image signing to push jobs (#148) 2022-08-31 14:10:31 +02:00
Itxaka 4bdd3e01b8
Drop uneeded files and add extra label (#135)
Stuff under dmidecode is part of the register command.

Also drops some old sutff unused from the ros-installer

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

Signed-off-by: Itxaka <igarcia@suse.com>
Co-authored-by: Klaus Kämpf <kkaempf@suse.de>
2022-08-11 15:05:19 +02:00
Itxaka 4c75b5c69e
Add auto labeler (#125)
Signed-off-by: Itxaka <igarcia@suse.com>

Signed-off-by: Itxaka <igarcia@suse.com>
2022-08-10 21:54:50 +02:00
Itxaka 7c81cbf8ec
Store binary artifacts on PR/master (#127) 2022-08-10 12:21:01 +02:00
Itxaka ea7884e8df
Produce 2 binaries instead of one (#99)
* Produce 2 binaries instead of one

This generates a different binary for the register command as to not
bundle it with the full operator.

On the makefile separated builds have been done for operator and
registry.

On the docker image a different container is created for the register
and pushed to a different repo as well.

For releases gorelease generates 2 different binaries.

Signed-off-by: Itxaka <igarcia@suse.com>
2022-08-01 15:08:23 +00:00
Itxaka 190a6c0ff0
Push master merges to elemental-operator-ci (#100) 2022-08-01 14:47:06 +00:00
Itxaka 0de7dd7a9d
Some fixes for the release pipelines (#53)
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-15 14:55:42 +02:00
Itxaka 618d3c4da3
Log the version, commit and commit date on start (#43) 2022-07-15 09:50:18 +00:00
Itxaka bcfe4d0e79
Add test for chart values (#31) 2022-07-13 10:12:15 +02:00
Itxaka a71f29eba0 [ci] Up the go version and restore the proper cache
We were restoring the cache of go always but we need to restore only if
the sha of the go.sum its the same, otherwise we need to recreate the
cache

Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:26:19 +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 26464f0e69 Rework tests workflow
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
Itxaka 66f27ebca1 Add missing Dockerfile and adapt the version passed to operator
Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-11 15:12:19 +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
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
Ettore Di Giacinto 62896c4d99
Enhance tests
Co-authored-by: David Cassany <dcassany@suse.com>
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Co-authored-by: Ettore Di Giacinto <edigiacinto@suse.com>
Co-authored-by: David Cassany <dcassany@suse.com>
2022-04-04 15:05:42 +02:00
David Cassany 771b592ee1
Allow to set a bridge ip
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Co-authored-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-04 12:56:59 +02:00
Itxaka 01c99c5f92 Fix chart values for release
We were missing setting the proper repo and short tag on tag release and
were instead leaving the default values in there which made our released
chart point to the ci values with ci images

Instead point ot the proper repo and set the image tag of the chart to
the released tagged image (no commit or anything in the image)

Signed-off-by: Itxaka <igarcia@suse.com>
2022-04-01 11:11:39 +02:00
Itxaka f00780b43d Push index directly to update gh-pages
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-31 11:11:30 +02:00
Itxaka cdadf5439a
Merge branch 'main' into kind_improvements 2022-03-30 15:10:26 +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
Itxaka e50a2ea933 Only run e2e tests on PR or merged to master
Otherwise it duplicates on PR

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-30 12:33:39 +02:00
Itxaka d5288fcc17 Some kind improvements
- Allow setting different image versions for kubernetes
 - Set a matrix for kubernetes version on CI
 - Use kubectl wait to wait for control panel to be ready
 - Set default kubernetes version to latest rancher ready (v1.22.7)

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-30 12:33:39 +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 b733f9f24a Auto push chart to gh-pages
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-25 09:16:32 +01:00
Itxaka 6ef2ee06b8 Pass the chart name from one job to the other
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 14:48:44 +01:00
Itxaka bcbe339e38 Use the same binary name across
There was a mix of ros-operator and rancheros-operator.

This patch fixes it so its always rancheros-operator, even
changing the repos to have the full name so everything matches

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 13:41:54 +01:00
Itxaka 2d80aeb3bd Keep the raw version on docker push
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 13:35:12 +01:00
Itxaka 005df2f7f2 Add labels to pushed images
Seems to fix an obscure bug that can happen when pushing:
https://github.com/docker/build-push-action/issues/452

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:32:44 +01:00
Itxaka 50372f60a0 Trigger integration tests on main branch
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:21:43 +01:00
Itxaka beabcc90ae Only push to cos-operator from a tagged release
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 11:12:37 +01:00
Itxaka ac71ea0222 Rename the jobs for easy identification
Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:39:43 +01:00
Itxaka 115c6669a1 Use the docker actions for pushing
- Easier to set
 - Gets the tags correctly
 - Cleans up afterwards
 - USes gha cache for building

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:35:12 +01:00
Itxaka 9f93860d4b Fix integration test
- Run it only under PRs for testing
 - The docker job is the one that pushes the images tot he proper repo
 - Integration will only push to the ros-operator-ci registry

Signed-off-by: Itxaka <igarcia@suse.com>
2022-03-24 10:04:26 +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
Loic Devulder 933b58971e
CI: bootstrapping nodes with MachineRegistration (#56)
* ci: add installation test with Rancher
* ci: add auto-provisioning of the VM
* ci: install Rancher on GH runner
* ci: move rancher installation+configuration in scripts
* ci: define our own MachineRegistration
* ci: install generated RancherOS Operator chart
* ci: don't use default namespace for test cluster
* ci: add TPM device to VM
* ci: refactoring + add OS installation and config
* ci: use iPXE to install the OS
* ci: keep artifacts and cleanup at the end
* ci: use 'script -e -c` to simulate a TTY
* ci: add check on cluster creation
* ci: fix SERVER_ID
* ci: specify that RKE2 can be installed too
* ci: use container image on self-hosted runner
* ci: add missing packages in container
* ci: upload needed logs
* fix/ci: use quays.io and official repos
* fix/ci: '\n' is not needed when assigned to a var
* ci: move bootstrapping node test in tests folder
* ci: add 'make' package

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2022-03-21 17:13:30 +01:00