* util: add network util functions
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* Label Templates: add IPAddress to the Network vars
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* util/net: rework to allow mocking system ip address retrieval
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* util/net: return all the available network addresses
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* Label Templates: add IPAddresses.{num} to the Network vars
track all available network addresses
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* make generate-mocks
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* tests: add util/net coverage
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* error strings should not be capitalized
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
---------
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* RBAC: restrict SeedImage controller auth to fleet-default
do not allow the seedimage-controller to operate on pods, services and
configmaps outside of the fleet-default namespace.
Fixes#457
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* RBAC: move all rbac resources to rbac.yaml
Also have all of them collected and generated via kustomize
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
---------
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* 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>
* Structure OBS package recipes in folders matching the OBS package name
Signed-off-by: David Cassany <dcassany@suse.com>
* Adapting specfile to new package format
Signed-off-by: David Cassany <dcassany@suse.com>
* Adding _service files to .obs sources
Signed-off-by: David Cassany <dcassany@suse.com>
* Fine tune specfile
Signed-off-by: David Cassany <dcassany@suse.com>
* Use %VERSION% as the version placeholder
Signed-off-by: David Cassany <dcassany@suse.com>
* Remove unneeded OBS workflow
Signed-off-by: David Cassany <dcassany@suse.com>
* Adapt Makefile to new charts paths
Signed-off-by: David Cassany <dcassany@suse.com>
---------
Signed-off-by: David Cassany <dcassany@suse.com>
* 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>
* Drain nodes by default on upgrade
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
* Make DrainSpec nullable
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
---------
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Mainly, change the var "channel.repository" to "channel.image":
"repository" var values are collected by the Rancher Marketplace for air
gap support. Anyway, in the case of the Elemental Channel, the image
should be re-generated in case of air gap scenario following the
official Elemental docs.
Also note that now the channel.image should contain the full url, not
prepended with the registryUrl or the systemDefaultRegistry.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
The seedimage-builder image is needed to install the built chart: let's
add it to the setup-full-cluster target.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* 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>
In the Makefile we try to install a hardcoded ginkgo version.
This commit uses the ginkgo version in the go.mod file instead.
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Since leap does not include a compatible version of xorriso, switch back
to tumbleweed.
Got errors when trying to install util-linux package on tumbleweed, but
it does not seem to be needed.
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
repo name changed from "elemental-teal-channel" to "elemental-channel":
fix it for local builds
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* Bring your own SeedImage builder
This commit adds functionality to define which build-image to use for a
SeedImage. If no build-image is provided the default one is used.
The BuildContainer only takes Name, Image, ImagePullPolicy, Args and
Command in order to limit what the user is able to do.
The user-defined build container will also mount a ConfigMap with
environment variables for device, base-image, registration-url and
ISO output-name.
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
* feat: Add Size to SeedImageSpec
Size is used to calculate ephemeral resource requests when building the
seed-image.
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
this is needed to align with the registry/repo templating introduced for
airgapped scenario support.
While there, also drop the SEEDIMAGE_TAG: just use the common TAG for
the seedimage container image.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
- 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
We want to drop the pre-hook job reworking the annotations on the
Elemental Operator CRDs as soon as possible. The expected user workflow
is to upgrade to 1.2.4 first if they want to upgrade from the legacy
elemental-operator chart to the newer splitted charts.
So, let's drop the pre-hook job from the main elemental-operator chart
but let's keep it around, in a separate chart, that could still be used
as a standalone chart for manual migration.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
The parallelized number of tests is based on the number of available
processors only. The memory usage for the controllers unit-test is big
and we end up using quite some RAM. If systems with mmany CPUs and not
that huge GBs of RAM (my system has 16 cores and 16GB of RAM) we likely
start to hit the swap space.
The end result I get is that if I have less than 8GB free my system starts
trashing and becomes unresponsive. Even if I have more than 8GB free I consume
some swap space and the tests run slower than when serializing tests!
----
$git clean -fdx; time make unit-tests
With parallelization:
real 0m17.477s
user 2m8.029s
sys 0m14.570s
Without parallelization (with this patch):
real 0m14.271s
user 0m27.395s
sys 0m4.659s
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* 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
* Add e2e test config
* Switch to using test config
* Update vendor
* Fix lint issues
* Change rancher namespace variable name
* Put do nothing test back
These changes are required to facilitate OBS code updates and builds by simply triggering OBS services. This allows updating code and rebuild in OBS based on github events such as on tag, on merge, on push...
Signed-off-by: David Cassany <dcassany@suse.com>
* register: build it with CGO
It's needed to be able to use TPM emulation.
* goreleaser: add entry for elemental-support
Signed-off-by: Loic Devulder <ldevulder@suse.com>