Commit Graph
499 Commits
Author SHA1 Message Date
1cbed90674 Update github/codeql-action digest to 99df26d (#999)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-07-09 10:36:39 +02:00
Enrico CandinoandGitHub 3d0438edc9 Update k8s dependencies to v1.36 (main) (#979)
* Update k3s version in test suites to v1.36.2-k3s1

- Updated the k3sVersion and k3sOldVersion constants in both cli and e2e test suites to reflect the new version v1.36.2-k3s1 and the previous version v1.36.0-k3s1.

* updated README.md
2026-07-08 15:58:06 +02:00
9c82b68440 Update GitHub Actions (#994)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-07-08 11:33:02 +02:00
2e1781f022 Update golangci/golangci-lint-action action to v9.3.0 (#990)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-07-07 22:53:51 +02:00
39cc69f3e3 Added HCP (Hosted Control Plane) mode (#876)
* Add HCP (Hosted Control Plane) support

Introduce hosted control plane mode for k3k virtual clusters, including
API types, controller logic, server endpoint handling, CLI flags,
CRD updates, kubeconfig generation, and examples.

Co-Authored-By: RuFlo <ruv@ruv.net>

* removed hcpRegitration command

added HCP conformance tests

warning for hcp

fix multi-VM HCP conformance test networking

  Both QEMU workers booted with `-net user` and ended up registering the
  same InternalIP (10.0.2.15) because each VM gets its own isolated NAT
  slirp. Flannel propagated this to `public-ip` on both nodes, so VXLAN
  could not tunnel between workers and any cross-node pod traffic broke
  (89 failed / 335 passed of 424 conformance specs).

  Replace user-mode networking with a Linux bridge (k3kbr0,
  192.168.100.0/24) and one TAP device per VM, so the two workers share
  an L2 segment with unique routable IPs. NAT outbound from the bridge
  keeps internet access working for image pulls.

  Also set unique hostnames via cloud-init (worker-1/worker-2) and drop
  the `--node-name` flag from INSTALL_K3S_EXEC, since k3s now picks the
  correct node name from the OS hostname on its own.

  Bump hydrophone back to `--parallel 4` to match the single-VM job
  (parallelism was reduced earlier when the failure was thought to be
  resource-related).

added HCP print command

updated crds

adding e2e tests

Refactor selectNonLoopbackSAN function to accept SANs directly and update related logic in ensureHCPRegistration

* Update agent flag validation and enhance ingress host check with a warning log

Refactor descriptions for cluster provisioning mode and role in CRDs and documentation

Refactor logging in ServerURL function to use controller-runtime logger

Rename selectNonLoopbackSAN to findNonLoopbackSAN for clarity and update references

Refactor ServerURL function and related code to remove unused parameters and improve clarity

Remove unused imports from kubeconfig.go to improve code clarity

* suggested changes

* fix comment

* fix test

---------

Co-authored-by: jpgouin <jeanphilippe.gouin@suse.com>
Co-authored-by: RuFlo <ruv@ruv.net>
2026-07-07 14:12:19 +02:00
Kevin McDermottandGitHub 33216d49ae Merge pull request #950 from bigkevmcd/expose-service-annotations
Support annotations on exposed Services
2026-07-07 10:17:12 +01:00
88122905c9 Update GitHub Actions (#986)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-07-06 14:09:58 +02:00
Kevin McDermott 4cd5bd85d0 Refactor the service tests. 2026-07-06 08:42:20 +01:00
Kevin McDermott f1dbf33435 Support annotations on exposed Services
This adds a new .spec.expose.annotations field which is applied to the
service when it's created.
2026-07-06 08:19:30 +01:00
d94b9d685e Update GitHub Actions (#969)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-07-03 17:49:16 +02:00
7f2cf6fe98 Add --tls-sans flag to k3kcli (#925)
* Add --tls-sans flag to k3kcli cluster create

* Refine --tls-sans flag description in k3kcli documentation

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix TLS SANs handling in cluster creation by using hostname directly

* Implement extractHost function and update TLS SAN handling in cluster creation

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-02 13:23:13 +02:00
7879a7679d Update ginkgo and gomega (main) (#956)
* Update ginkgo and gomega

* Update Ginkgo to version 2.32.0 in workflows and Makefile

---------

Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
Co-authored-by: Enrico Candino <enrico.candino@suse.com>
2026-07-02 12:34:00 +02:00
Enrico CandinoandGitHub 11953e315d Enhance command flag handling and completion for cluster and policy creation (#933)
- Refactor createFlags function to return an error for better error handling.
- Add flag completion functions for cluster mode and persistence type.
- Implement disableFileCompletion to prevent default filename completions.
- Register flag completion for mode in NewPolicyCreateCmd.
2026-07-02 10:11:22 +02:00
Enrico CandinoandGitHub 3db4cc0652 Refactor test suite to remove K3s container dependency (#971)
- Removed K3s container setup and teardown logic from CLI and E2E test suites.
- Simplified Kubernetes client initialization by eliminating the need for K3s container.
- Updated InitFromKubeconfig function to no longer require K3s container as a parameter.
- Deleted unused HelmInstaller and RESTClientGetter implementations.
- Cleaned up logging functions related to K3s and Helm operations.
2026-07-02 10:10:48 +02:00
fa16898689 fix EXTRA_ARGS parsing in the startup command (#951)
* fix EXTRA_ARGS parsing in the startup command and add multi server args test

* fix lint

* Refactor server config tests to improve readability and maintainability

---------

Co-authored-by: Enrico Candino <enrico.candino@suse.com>
2026-07-01 18:17:58 +02:00
Enrico CandinoandGitHub ed3e901229 Add K3K prefix to k3kcli env vars, align cli test, add failCount (#962)
* align test-cli

* test context

* increase timeout

* Enhance cluster readiness check with failure count limit
Add prefix K3K to env vars
2026-07-01 11:14:37 +02:00
Hussein GalalandGitHub 3abffae92d External datastore support (#879)
* Adding new k3s function to get the config
* Adding a new way to get the bootstrap data directly from the server Pod
* Gate the bootstrap fetch if external datastore is in use
---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-06-26 17:22:00 +03:00
Enrico CandinoandGitHub 244011e68d Refactor kubeconfig URL generation (#938)
* Refactor kubeconfig generation to remove unused port parameter and update related functions

* Refactor kubeconfig generation to streamline error handling and remove unused imports

* Refactor kubeconfig URL generation functions and deprecate old implementation

* restore old behavior

* Add 'k3kcli kubeconfig get' command and update documentation

* Refactor URL generation by removing deprecated getURLFromService function and updating tests to use new implementation

* Fix expected URL for LoadBalancer test case to include hostname

* Refactor kubeconfig test documentation to clarify URL generation behavior for ClusterIP, NodePort, and LoadBalancer service types

* Refactor kubeconfig URL generation functions to improve clarity and maintainability

* Remove deprecated 'k3kcli kubeconfig get' command and update related documentation

* Set logger to discard in NewRootCmd for improved logging control

* Refactor getURLFromService to streamline ingress key retrieval
2026-06-26 11:16:54 +02:00
Enrico CandinoandGitHub d008deded7 Update indirect dependencies in go.mod and go.sum to latest versions (#944) 2026-06-25 19:53:56 +02:00
d75c0346da Update ginkgo and gomega (main) (#922)
* Update ginkgo and gomega

* Update Ginkgo version to v2.31.0 in workflows and Makefile

---------

Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
Co-authored-by: Enrico Candino <enrico.candino@suse.com>
2026-06-25 19:44:06 +02:00
5dcc97736f Update actions/setup-go digest to 924ae3a (#934)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-25 17:47:19 +02:00
Enrico CandinoandGitHub 1e23fdb4fa Add unit tests for URL generation across service types in kubeconfig (#939)
* Add unit tests for URL generation across service types in kubeconfig

* addressed comments for SchemeBuilder and Context

* Refactor client creation and REST config loading in NewRootCmd

* Refactor scheme and schemeBuilder initialization

* use t.Helper in helper funcs
2026-06-25 14:44:19 +02:00
4526ba8962 Update rancher/renovate-config digest to fc79cf4 (#935)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-25 11:07:09 +02:00
22b4e1d37a Update codecov/codecov-action action to v7 (#936)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-25 10:56:53 +02:00
667946e898 Update actions/checkout action to v7 (#940)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-25 10:47:40 +02:00
f28666692c Update rancher/renovate-config digest to af4fff4 (#919)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-19 12:13:45 +02:00
00e50127b2 Update golangci/golangci-lint-action action to v9.2.1 (#921)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-19 12:12:56 +02:00
a8be7b888d Update rancher/renovate-config digest to 206454e (#911)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-16 09:33:26 +02:00
09d8f5a2c4 Update rancher/renovate-config digest to f6f6a07 (#902)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-15 16:11:39 +02:00
Enrico CandinoandGitHub 651da42ef0 Added provider.cattle.io=k3k label to Clusters (#901)
* added provider k3k label

* small change to check  build
2026-06-12 16:12:38 +02:00
ff02eb5473 Initial support for kata runtimes (#814)
* update shell script to exec and remove pipe, add conditional kmsg mount for kata

update logging config

Apply suggestions from code review

Co-authored-by: Enrico Candino <enrico.candino@gmail.com>

pr comments, remove isKata, fix agent unit tests, update config

fix validation

fix template

revert log changes

update init script

remove emptydir mounts from kata

remove emptydir mounts from kata

fix tests

lint

* add quickstart docs

* centralise kata spotspec modifications

* update doc

* update docs
2026-06-12 13:57:42 +03:00
Enrico CandinoandGitHub f1f5923898 Update github.com/containerd/containerd to v1.7.32 (#893) 2026-06-10 15:16:04 +02:00
656cf5969f Update rancher/renovate-config digest to a473c74 (#870)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-10 14:43:56 +02:00
8466cc6e19 Update module go.etcd.io/etcd/client/v3 to v3.6.12 (#847)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-10 11:39:05 +02:00
8e39493dac Update GitHub Actions (#865)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-10 11:10:56 +02:00
c821166425 Update go toolchain directive to v1.26.4 (#877)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-06-09 15:50:10 +02:00
Enrico CandinoandGitHub 63252658c4 added branch release/v1.1 to renovate config (#888) 2026-06-09 15:37:05 +02:00
Hussein GalalandGitHub 5bd779cdaa Refactor bootstrap data management (#869)
* Refactor bootstrap data management

* Change errors from errors.New to fmt.Errorf

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-06-03 19:40:31 +03:00
Hussein GalalandGitHub 0a16522e39 Remove pod mutating webhook refrences (#858)
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-06-03 16:04:42 +03:00
Kevin McDermottandGitHub 41330e1dae Merge pull request #867 from bigkevmcd/event-synchroniser
Mirror events for the cluster into the virtual cluster.
2026-05-22 13:22:24 +01:00
Kevin McDermott f24a978edf Switch to loading a Pod.
Load the pod explicitly rather than the unstructured from the
InvolvedObject reference.
2026-05-22 12:29:02 +01:00
14cc78bc43 Update k3k-kubelet/translate/host_test.go
Co-authored-by: Hussein Galal  <hussein.galal.ahmed.11@gmail.com>
2026-05-22 12:25:49 +01:00
Kevin McDermott 4795ef5ae7 Mirror events for the cluster into the virtual cluster.
Adds a controller to watch for virtual cluster namespace events and
mirrors them into the virtual cluster.
2026-05-22 08:44:13 +01:00
fbaac329d1 Update github/codeql-action action to v4 (#862)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-05-21 11:31:58 +02:00
Enrico CandinoandGitHub 3270c27212 bump Go to 1.26.3 and some deps (#863) 2026-05-21 11:31:30 +02:00
dfbc6012f3 Update module go.etcd.io/etcd/api/v3 to v3.6.11 (#846)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-05-21 00:16:12 +02:00
38dbc42f17 Update module go.uber.org/zap to v1.28.0 (#839)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-05-21 00:13:46 +02:00
51b40f2a9c Update GitHub Actions (#824)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-05-21 00:13:04 +02:00
07625097fc Update rancher/renovate-config digest to 45f7159 (#823)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2026-05-21 00:12:40 +02:00
Hussein GalalandGitHub 8457d3a20b Refactor servers and agents configuration management (#827)
* Refactor server config secret

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* lint fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Refactor Agents configuration for virtual and shared mode

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* wsl

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix typo

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix unit tests

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Remove go assert depednecny

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2026-05-12 15:57:24 +03:00