Commit Graph

158 Commits

Author SHA1 Message Date
Andrea Mazzotti fcbb5bc8b5
[fix] Return error on missing k8s version
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-09-24 16:49:32 +02:00
Andrea Mazzotti 1c21683f6a
Use DefaulterRemoveUnknownOrOmitableFields
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-09-05 15:07:36 +02:00
Andrea Mazzotti 2ece70ce14
Bump CAPI to 1.10.5
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-09-01 09:35:21 +02:00
Andrea Mazzotti b5d5f5ed5a
Fix conditions formatting
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-08-28 13:48:40 +02:00
Parthvi Vala 9206024b77
Add defaulter to RKE2ConfigTemplate webhook; move ignored fields
deletion to webhook function

Co-authored-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-08-26 15:01:09 +05:30
Parthvi Vala bfaa2e0f11
Fix lint failures
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-08-21 18:59:26 +05:30
Parthvi Vala 40b7c21135
Add the correction to RCP and RCPTemplate
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-08-21 18:54:22 +05:30
Parthvi Vala 0d2c3754df
Add unit test
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-08-21 18:54:12 +05:30
Parthvi Vala beee8a6bfa
Move the cleanup code to webhook
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-08-21 18:54:05 +05:30
Parthvi Vala fe8268a602
Merge pull request #698 from valaparthvi/config-map-file-source
Add ConfigMap support as FileSource
2025-07-29 09:36:49 +00:00
Parthvi Vala 0abbd4ad0e
Change Secret and Config FileSourceRef to pointer
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-07-23 12:27:13 +05:30
Parthvi Vala 8b70f93fa8
Fix lint failures
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-07-22 12:18:51 +05:30
Parthvi Vala 17bb9bb994
Add omitempty to Secret and ConfigMap file source; re-add webhook validation
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-07-22 11:46:54 +05:30
Parthvi Vala 53e97f43f5
fix linter failure 2025-07-17 18:51:36 +05:30
Parthvi Vala 1700178b0c
Add conversion functions
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-07-16 15:50:33 +05:30
Parthvi Vala d5d4478aa9
Change SecretFileSource and ConfigMapFileSource to single FileSourceRef
Signed-off-by: Parthvi Vala <parthvi.vala@suse.com>
2025-07-16 11:59:28 +05:30
Furkat Gofurov af141da642
Merge pull request #694 from apoorvajagtap/feature-gate
Configures usage of feature-gate & manager flags
2025-07-14 18:13:54 +00:00
Apoorva Jagtap 3cde10826e
configure feature-gate & flags 2025-07-14 22:58:10 +05:30
Parthvi Vala b7f3811142
Add ConfigMap support as FileSource 2025-07-11 22:27:52 +05:30
Furkat Gofurov c0179a2c1b
Do not default GzipUserData field to false in the webhook
Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
2025-07-03 11:40:54 +03:00
Furkat Gofurov 9c7e908097
Handle ignition compression for Ignition format
Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
Authored-by: @zioc
2025-07-02 14:43:41 +03:00
Furkat Gofurov 45c55cace3
Drop unnecessary nil check
Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
2025-07-02 14:43:41 +03:00
Furkat Gofurov 25d066d971
Add a new `gzipUserData` boolean API field in `RKE2ConfigSpec`
Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
2025-07-02 14:41:43 +03:00
Alexandr Demicev 01883c638a
Increase amount of concurrent reconciliations
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
2025-06-27 14:43:22 +02:00
Matthew Boedicker 701b40f50e
Pass AdditionalUserData.Data to NewJoinControlPlane
The same way it's passed to NewInitControlPlane.

Fixes #677.
2025-06-24 13:18:06 -07:00
Carlos Salas 0abf292041
chore: align code structure to latest linter spec
Signed-off-by: Carlos Salas <carlos.salas@suse.com>
2025-05-27 10:32:40 +02:00
Andrea Mazzotti 30551855fa
Merge pull request #664 from anmazzotti/add_webhook_logs
Improve webhooks logging
2025-05-26 13:09:34 +00:00
Dirk Müller 6735d99f6b
Simplify service start
systemctl enable + systemctl start can be combined into one. also
move it after the restorecon. This potentially allows dropping the
setenforce disablement

Signed-off-by: Dirk Müller <dmueller@suse.com>
2025-05-23 14:48:03 +02:00
Andrea Mazzotti 065a235939
Improve webhooks logging
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-05-23 11:32:39 +02:00
Dirk Müller ec972f0103
drop semanage call on nonexisting service
the rke2 install script installs the service in /etc/systemd/service
and the restorecon call already sets the proper context on it (but since
we start the service beforehand, that doesn't seem to be necessary..).

semanage(1) isn't always preinstalled in the operating system image, and
if this service exists, the relabeling at boot will restore the context.

Signed-off-by: Dirk Müller <dmueller@suse.com>
2025-05-22 14:28:13 +02:00
Andrea Mazzotti 243803e91f
Add debug log trail to Machine rollout
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-05-14 10:17:33 +02:00
Dinar Valeev 4ee21dfdc9
Move sshd config into included subdir
By writing into /etc/ssh/sshd_config we override default config which
usually defines include /etc/ssh/sshd_config.d/*.conf. This breaks an
ability to cusomize config further. And disables include any files dropped
into sshd_config.d directory.

This commit moves RKE2 sshd config into subdirectory with 010 index
so it will be loaded first.

Signed-off-by: Dinar Valeev <k0da@opensuse.org>
2025-05-06 12:36:45 +02:00
Alexandr Demicev ae404ceb18
Default RKE2 control plane replicas to 1 if not specified
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
2025-05-02 16:09:14 +02:00
Dinar Valeev 7fcabf3980
Render rke2-install without semanage for flatcar
Signed-off-by: Dinar Valeev <k0da@opensuse.org>
2025-04-29 15:28:32 +02:00
Furkat Gofurov 8788b0e822
Merge pull request #631 from AbsaOSS/butane_flatcar
🐛 Ignition: Don't add /opt fs on flatcar
2025-04-29 10:32:42 +00:00
abouts 1fa458e659
Gzip is not supported only for ignition format 2025-04-28 23:36:03 +02:00
Dinar Valeev 21f04a095c
Ignition: Don't add /opt fs on flatcar
Signed-off-by: Dinar Valeev <k0da@opensuse.org>
2025-04-24 13:24:45 +02:00
Furkat Gofurov 2479d29ffc
Merge pull request #624 from andybavier/concurrency
Enable concurrency in controllers
2025-04-23 09:13:12 +00:00
Andy Bavier ee0a8295b2
Enable concurrency in controllers 2025-04-22 08:08:53 -07:00
Furkat Gofurov 149e533a93
In-place propagation support for RKE2ControlPlane
Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
2025-04-18 19:50:31 +03:00
Andrea Mazzotti 3ad0b591ae
Bump golangci-lint to v2
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-04-08 09:06:01 +02:00
Alexander Demicev d6992a93ef
Merge pull request #595 from rancher/dependabot/go_modules/golang.org/x/net-0.36.0
chore(deps): Bump golang.org/x/net from 0.33.0 to 0.36.0
2025-03-21 11:08:51 +00:00
Alexandr Demicev 5baa17c801
Fix all linter warnings
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com>
2025-03-20 12:52:07 +01:00
Max Fedotov 1b561ebe80
use RegistrationAddress for first controlPlane node if it is specified 2025-03-17 22:38:06 +01:00
Andrea Mazzotti ef1a157fe8
MachinePool support
Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
2025-02-26 15:57:57 +01:00
Furkat Gofurov 481c11ece3
Fix linting issues in the codebase
Signed-off-by: Furkat Gofurov <furkat.gofurov@suse.com>
2025-02-21 13:48:48 +02:00
Ashley Dumaine a075ace50f
use apierrors for bad request 2025-02-20 10:10:48 -05:00
Ashley Dumaine 5de4a66f9b
Add kubebuilder markers for default and validation structs to prevent generation of DeepCopy methods 2025-02-20 10:10:48 -05:00
Ashley Dumaine 4153ffbfb7
update how webhooks are registered 2025-02-20 10:10:47 -05:00
Ashley Dumaine 0e7c20d99d
bump controller-runtime to 0.20.1, update webhooks and tests 2025-02-20 10:10:47 -05:00