Commit Graph

71 Commits

Author SHA1 Message Date
Francesco Giudici 43f3b00193
Bump libraries to incorporate CVE fixes (#913)
* Bump libraries to incorporate CVE fixes

Bump golang.org/x/net to cover CVE-2025-22870 and fix bsc#1238700.
Bump golang.org/x/crypto to cover CVE-2025-22869 and fix bsc#1239335.

In addition and as a requirement of the new x/crypto library go is bumped to 1.23

Signed-off-by: David Cassany <dcassany@suse.com>

* Dockerfile: bump golang container to 1.24 (#912)

Required since vendored x/crypto lib requires go ver >= 1.23

Related to #dd41431b0b2792f0fca005adf3abc3cf471877c4

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

* CVE-2025-22872

Bump golang.org/x/net
https://github.com/advisories/GHSA-vvgc-356p-c3xw

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

* go mod vendor

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

---------

Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
Co-authored-by: David Cassany <dcassany@suse.com>
2025-06-16 11:01:16 +02: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
Francesco Giudici 2c3f177fd2
Revert "CI: fix CodeQL test (#655)" (#663)
This reverts commit b3b80b7864.
2024-06-18 18:05:46 +02:00
Andrea Mazzotti 9c8550fdfb
Allow yip configs (#751)
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-06-17 10:25:17 +02:00
Fredrik Lönnegren ccdd204430
Update golang.org/x/net to v0.23.0 (#734)
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2024-05-21 14:18:39 +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
Fredrik Lönnegren 712c8a8e99 Update github.com/golang/protobuf
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2024-03-14 09:55:31 +01:00
dependabot[bot] 0a0298a3e3 Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-14 09:55:31 +01:00
Francesco Giudici b3b80b7864
CI: fix CodeQL test (#655)
see https://github.com/github/codeql/issues/15647
2024-03-11 10:34:08 +01:00
Andrea Mazzotti 79e4fb117f
Bump go to 1.22 (#643)
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2024-02-23 08:58:26 +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 5f1d1cfe75 Use go 1.20
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2024-02-15 11:43:14 +01:00
Fredrik Lönnegren 7878dd43af Use rancher/yip v1.4.10
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2024-02-15 11:43:14 +01:00
Fredrik Lönnegren 5f8c0400a3 Bump golang.org/x/crypto to 0.17.0
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-12-21 08:55:45 +01:00
Fredrik Lönnegren c546933825
Build raw disk images in SeedImage (#557)
* feat: Add Type field to SeedImageSpec

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* feat: Add raw disk build generation to SeedImage

If SeedImageSpec.Type is set to 'raw' we now try to run elemental
build-disk to generate the disk image.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Add elemental-toolkit to seedimage-builder

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* feat: Update yip to v1.4.5

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* feat: Reset yaml

Add yip cloud-config for raw disk-image that will extract the
elemental-register configuration to /oem/registration/config.yaml and
Start the elemental-register-install.service in the post-reset hook.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* feat: Use new toolkit param deploy-command

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

---------

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-11-20 17:28:09 +01:00
dependabot[bot] 8e4aabae7d
Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.7+incompatible (#560)
* Bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.24+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.24...v24.0.7)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* make vendor

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-11-01 09:42:06 +00:00
Fredrik Lönnegren de0d09834a Update google.golang.org/grpc to v1.56.3
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-10-27 09:30:07 +02:00
Fredrik Lönnegren 40b3376ccc
Bump dependencies (#540)
* Bump golang.org/x/net from 0.8.0 to 0.17.0

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Debug wait-commit-status

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Update google.golang.org/grpc to v1.53.0

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

---------

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-10-17 11:50:26 +02:00
Loic Devulder 3748944999 ci: bump k8s and Rancher Manager versions
Execute E2E tests on latest versions.

Signed-off-by: Loic Devulder <ldevulder@suse.com>
2023-10-12 15:39:57 +02:00
dependabot[bot] 017a64146f
Bump github.com/docker/distribution from 2.8.1+incompatible to 2.8.2+incompatible (#442)
* Bump github.com/docker/distribution

Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 09:45:14 +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
David Cassany Viladomat f4f34ca948
Use config map in seedimage pod (#423)
* Add client registration config utility
* Use a config-map for the seed-image pod
* Allow ConfigMaps manipulation in SeedImage RBAC
* Drop configmap-uid annotation
* go mod tidy
* Adapt tests
* Add createConfigMapObject tests

Signed-off-by: David Cassany <dcassany@suse.com>
2023-04-14 18:51:21 +02:00
dependabot[bot] 201f4d16e7
Bump github.com/docker/docker from 20.10.22+incompatible to 20.10.24+incompatible (#410)
* Bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.22+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.22...v20.10.24)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run make vendor

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-04-05 07:15:18 +00:00
Fredrik Lönnegren b27d2e6955
Update to go 1.19 (#408)
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-04-04 13:55:50 +02:00
Fredrik Lönnegren fe8f53f2d2 Unify logging
Use klog for all logging and remove logrus.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-02-22 18:43:48 +01:00
Fredrik Lönnegren 2644a7a3e5 Lints
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-01-16 17:00:27 +01:00
Fredrik Lönnegren a2a10bdb11 Update wharfie to 0.5.3
Fixes #11

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-01-16 17:00:27 +01:00
Fredrik Lönnegren d452a355c7 Use go 1.18
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
2023-01-12 11:13:23 +01:00
David Cassany Viladomat af83eea27f
Drop legacy catalog for tests (#291)
Signed-off-by: David Cassany <dcassany@suse.com>
2022-12-14 16:35:15 +00:00
Itxaka 7b8af5995f
Send full system data on registration (#276) 2022-12-14 16:23:15 +01:00
Alexander Demicev b4649dd363 Kubebuilder: Remove unused code (#267)
* Remove unused code

* Run make vendor
2022-12-12 12:15:22 +01:00
David Cassany Viladomat 173ebae8e1 Drop requeuer, not needed anymore (#255)
* Drop requeuer, not needed anymore
* Improve logging

Signed-off-by: David Cassany <dcassany@suse.com>
2022-12-12 12:15:22 +01:00
Alexander Demicev 388839e32d Kubebuilder: Add "verify" workflow (#244)
* Add new verify tasks

* Fix go mod
2022-12-12 12:15:22 +01:00
Alexander Demicev e1dc2202b6 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-12-12 12:15:22 +01: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 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 01c7190e70 Fix TAG used as part of the buildt
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
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