* Add cluster deletion and completion enhancements
- Implemented `--all` flag for deleting all clusters in a namespace.
- Updated argument parsing to allow for maximum one cluster name.
- Added completion functions for cluster names with namespace filtering.
- Enhanced tests for cluster argument resolution and completion functions.
* fix docs
* Add log message for empty cluster deletion in specified namespace
* Refactor context handling in command functions to use `cmd.Context()`
* Add completion to `--namespace` flag
* Add namespace completion to policy create command
* Refactor namespace completion functions for consistency across commands
* addressed some comments
* 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>
* 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>
- 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.
* 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
* 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
* removed all webhook references
* fix tests
* removal of webhook
* updated doc
* add downward API test
* small refactor of virtual-kubelet
* split tests
Previously the resource.Quantity was stored as string which allowed
invalid values to be created.
This performs validation on the strings using the standard K8s resource
mechanism.
* added --namespace flag to policy create to actually bind the new policy to existing namespaces
* fix lint
* fix tests
* added overwrite flag
* updated cli docs
* fix tests 2
* moved double quotes to single quote
* fix test