Commit Graph

70 Commits

Author SHA1 Message Date
Julien ADAMEK 338f566811 Add maintenance case to elemental-airgap.sh 2025-09-05 15:25:50 +02:00
Francesco Giudici 8fc8efd48e
[Airgap] extend yq support in the airgap script (#898)
The airgap script used to work with the Mike Farah's yq.
Anyway, it was incompatible with the Andrey Kislyuk's yq version (which
is the main python3 version you would get via pip).

Drop the eval arg from yq in the airgap script to make it compatible
with both.
Also check the yaml keys are there before trying recursion (which would
led to error out with some yq parsers)

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2025-01-31 15:51:08 +01:00
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 08f6cda748
Build e2e chart locally (#852)
* Build e2e chart locally

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

* Add mockgen to build tools

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

* Add missing GINKGO tool

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

* Reduce e2e tests concurrency

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

* Make test more verbose

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

* Bump system-upgrade-controller version

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

* Raise timeout

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

* Print error

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

* Add plan crd

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

* Adjust timeout

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

* Do not deploy operator twice

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

* Restore vendored helper

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

* Do not attempt to delete pods multiple times

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

* Remove debug println

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

* Disable e2e workflow

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

* Update ele-testhelpers library

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

---------

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-10-01 12:54:40 +00:00
Loic Devulder 5702286029 [Airgap] Fix script to support Dev and Staging
Newer versions of Dev and Staging now need to be explicitly allowed to
be pull with Helm.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-09-30 09:34:51 +02:00
Loic Devulder 488ad0d890 [Airgap] fix channel extraction for 1.7 version
Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-08-22 10:04:37 +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
Loic Devulder b866419440 [Airgap] fix unstable channel extraction
Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-07-02 18:13:52 +02:00
Andrea Mazzotti 7f8f2e8ba2
Remove CodeCov action (#738)
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-05-27 10:45:34 +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
Francesco Giudici 4cbbbb88a5 [Airgap] minor: fix debug message
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2024-03-20 09:06:37 +01:00
Francesco Giudici 2c1a82c740 [Airgap] add script tests
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2024-03-20 09:06:37 +01:00
Loic Devulder 7611f3c61c
[Airgap] fix channel.json extraction (#669)
Allow run command to work for every (known!) versions.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-03-12 18:59:12 +01:00
Francesco Giudici 3bf6cbb7ef
[Airgap] fix "channel.image"/"channel.repository" value in "next steps" (#665)
channel.image expects a full image url, including the registry, while
channel.repository expects the repository url stripped of the registry.
Manage it correctly when printing the next steps.

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2024-03-12 17:53:16 +01:00
Loic Devulder 8b20123488 [Airgap] fix missing return code value
Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-03-11 10:52:02 +01:00
Loic Devulder aa0ba98320 [Airgap] Use bash test syntax
Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-03-11 10:52:02 +01:00
Francesco Giudici b0e7fa47c0 [Airgap] make the script work with both legacy and newer charts
Manage both the channel.image and channel.repository variables in the
chart.

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2024-03-11 10:52:02 +01:00
Loic Devulder 9ccb691f53 [Airgap] fix the airgap script
Changes made for Rancher Marketplace chart have impacts on the airgap
script.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2024-03-11 10:52:02 +01:00
Francesco Giudici 298cfe2c44
[Airgap] fix the airgap script (#654)
Fixes commit #9a0c1175c63d294ae8f84a5967e82c7596aa3a6a

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2024-03-05 12:04:50 +01:00
Francesco Giudici 9a0c1175c6
[Airgap] add support to Hauler in the airgap script (#647)
* scripts/elemental-airgap.sh: sort options in alphabetical order
* scripts/elemental-airgap.sh: add Hauler support

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2024-03-01 14:37:13 +01:00
Andrea Mazzotti 634cf69a78
Add dev baseimage build (#619)
* Add build-docker-register for local development

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

* Fix managed os image version when using custom registry ports

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-02-16 10:00:32 +01:00
Andrea Mazzotti 6c648b6faa
Test against k8s v1.27, rancher v2.8.2, and upgrade all test dependendencies (#628)
* Test against k8s v1.27, rancher v2.8.2, and upgrade all test dependencies

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-02-15 13:02:07 +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
Francesco Giudici 1f53971544
elemental-airgap: allow to just create the channel (#548)
...and also to skip archive creation.

This way the script should be ready for usage for the airgap scenario
with the chart in the Rancher Marketplace and could allow more custom
airgap setup where the images downloaded are pushed to the registry
in a different way, without passing through a tar.gz

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-10-19 09:52:40 +02:00
Francesco Giudici ebee5bfe07 elemental-airgap: fix skipping http/https URLs
Fixes #530

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-09-27 10:43:42 +02:00
Francesco Giudici fd0b7f26ec
elemental-airgap: fix automatic image channel name (#521)
when building the local channel image, if no name is provided, an
automatic one is created using the local registry name.
Drop the ':' from the registry name if present, otherwise docker tagging
will fail with an error.

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-09-20 13:40:28 +02:00
Francesco Giudici 0bbf0516c8
make verify: stay on mockgen v0.2.0 (#523)
latest, version v0.3.0, causes generate_mocks.sh to fail.
Stay on v0.2.0 for now.
2023-09-20 09:37:24 +02:00
Francesco Giudici 97e91d7e12
elemental-airgap: add support to OS images (#518)
Allow to extract and download the OS images specified in the channel
image shipped with the Elemental Operator chart.
Build a new channel image targeting the local registry of the airgapped
scenario (which is now a mandatory option).

Fixes https://github.com/rancher/elemental/issues/950

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-09-15 13:02:27 +02:00
Francesco Giudici f4c156ad5f elemental-airgap: allow to pass dev | staging | stable as argument
It will allow to automatically pick the right repos for both the
elemental-operator chart and the crds chart.

Minor improvements (overwrite image list txt file and add a couple of
usage examples in the help).
2023-09-05 17:57:34 +02:00
Francesco Giudici a69b632942 elemental-airgap: pick the operator chart as an argument
pick the chart as a mandatory argument.
If the argument is a path, download the chart. Otherwise consider it an
already downloaded file.

Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-09-05 17:57:34 +02:00
Francesco Giudici b66ed1ad76 elemental-airgap: add script to help airgap deployment
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
2023-09-05 17:57:34 +02:00
Andrea Mazzotti ffb9c010c4
Implement remote machines reset (#489) 2023-08-04 09:34:26 +02:00
Andrea Mazzotti 25abcdc57b
Improve re-registration (#479)
- Added full registration config and statefile path parameters on elemental-register
- Remove support for multiple configuration files
- Added (hardcoded) timer to skip registration updates for 24 hours
- Store emulated TPM seed for future registration updates
- Exit with error code in case of failures (systemd will manage restarts)
- Use virtual filesystem where possible
2023-07-18 15:09:21 +02: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 077ab69a7f Kubebuilder: Add make tasks for different tools (#194)
* Add tools binaries to Makefile

* Run make generate

* Update github workflows

* Impove path to tools
2022-12-12 12:15:22 +01: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
Itxaka 09ab84500d
Add a target to setup a clean cluster (#79)
This target (ab)uses the ginkgo BeforeSuite to have a ready-to-test
cluster with all prerequisites installed for easy testing.

It will build the docker image for the operator, build the chart
pointing to that image, setup a kind cluster, load the docker image
locally built into the cluster and run an empty test which is done so
the BeforeSuite is run, which installs all the needed charts and the
operator into the system.

Signed-off-by: Itxaka <igarcia@suse.com>
2022-07-22 14:46:19 +00: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
Jacob Payne c5a5dbd77f renamed to elemental-operator and switched to system agent 2022-06-30 16:01:13 +00:00
David Cassany 229245fb91
Add make target to test local changes in kind
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Co-authored-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-04-04 16:56:06 +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 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 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
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
Itxaka 649ad79a9d
Use ros-operator image for the ros-operator chart (#40) 2022-03-08 14:18:07 +01:00
Ettore Di Giacinto 709cb9cadc
chart: generate chart image from IMAGE_REPO, use framework images
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-02-09 15:32:14 +01:00