Hussein Galal and GitHub
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
Hussein Galal and GitHub
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 Galal and GitHub
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 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
Hussein Galal and GitHub
a9ddb0aa81
Filter requests. infrastructure resources for node capacity ( #834 )
...
* Filter requests. infrastructure resources for node capacity
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2026-05-05 17:08:42 +03:00
Hussein Galal and GitHub
07776f37dc
Remove the node capacity from the merged lists ( #816 )
...
* Remove the node capacity from the merged lists
* return if there is an error listing virtual/host nodes in update node capacity
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2026-04-28 15:12:55 +03:00
Enrico Candino and GitHub
cb985ec5ea
fix pvc race condition ( #786 )
2026-04-14 17:37:27 +02:00
Enrico Candino and GitHub
06c5aee7c9
add importas linter ( #779 )
2026-04-13 17:25:17 +02:00
Enrico Candino and GitHub
cd4e5340e3
check err nillness ( #774 )
2026-04-12 00:29:42 +02:00
Hussein Galal and GitHub
d7ab4320c7
Add support for projected service account tokens in shared mode ( #660 )
...
Add support for projected service account tokens in shared mode
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2026-04-09 10:35:34 +02:00
Gaurav Mehta and GitHub
8add97934e
minor fix to translated ingress tls secrets in ingress object ( #672 )
...
* minor fix to translated ingress tls secrets in ingress object
updated cluster ingress sync options to include extra field for SyncTLSSecrets
Signed-off-by: Gaurav Mehta <gaurav.mehta@suse.com >
* rebase changes from main, include feedback for renaming ingress secret sync field to DisableTLSSecretTranslation, and add kubelet integration tests to verify secret name translation
Signed-off-by: Gaurav Mehta <gaurav.mehta@suse.com >
---------
Signed-off-by: Gaurav Mehta <gaurav.mehta@suse.com >
2026-04-08 11:39:23 +02:00
Enrico Candino and GitHub
ef2bb0339a
Schedule Pods in the same Node with a preferred affinity ( #724 )
...
* Add integration tests for Deployment and StatefulSet creation with PVC in shared cluster
* Add affinity settings for pod scheduling based on agent hostname
* increased timeout
* focus test
* rmeove cleanup
* check for existing pvc
* remove focus
* add affinity tests for Pods in shared cluster
* refactor restartServerPod to improve pod restart checks and timeout handling
* unfocus
* fix test description
2026-03-31 11:22:10 +02:00
Enrico Candino and GitHub
18889ba6b7
Removed Pod mutating Webhook (shared mode) ( #699 )
...
* removed all webhook references
* fix tests
* removal of webhook
* updated doc
* add downward API test
* small refactor of virtual-kubelet
* split tests
2026-03-31 10:29:22 +02:00
Jonathan Crowther and GitHub
624fee98d7
Refactor tests to their own directories ( #723 )
...
* Move cli tests
* Move e2e tests to their own directory
* Move integration tests
* Fix path within the cli tests
* Move k3k-kubelet tests
* Improve the various make test- options
* Remove dead code from cli tests
* Update development.md with the new make commands
2026-03-26 09:45:31 -04:00
Enrico Candino and GitHub
9554628fc5
Update virtual-kubelet (v1.12) and Kubernetes deps (v1.35) ( #716 )
...
* bump virtual-kubelet and k8s
* bump controller-manager
* fix upgrade-downgrade
* fix kubernetes version
* Update tests_suite_test.go
* removed direct dep of yaml.v2, bump etcd modules
2026-03-23 12:51:43 +01:00
Enrico Candino and GitHub
7b0f695248
Bump some tes dependencies and fix lint ( #708 )
2026-03-18 17:43:41 +01:00
Kevin McDermott and Enrico Candino
d975171920
Change the nodes type to worker.
...
This modifies the configuration of the created nodes via virtual-kubelet
to set the node type to be worker instead of agent.
Bump the Ginkgo version to the latest - allows use of `t.Context()`
rather than creating contexts.
Co-authored-by: Enrico Candino <enrico.candino@gmail.com >
2026-03-17 09:28:30 +00:00
fcb05793b1
Refactor distribution algorithm to account for host capacity ( #688 )
...
* Refactor distribution algorithm to account for host capacity
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* simplify the useMilli condition
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* use nodelists instead of passing clients
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* only pass resource maps for both virtual and host nodes
Signed-off-by: hussein <hussein@thinkpad-hussein.hgalal.az >
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
Signed-off-by: hussein <hussein@thinkpad-hussein.hgalal.az >
Co-authored-by: hussein <hussein@thinkpad-hussein.hgalal.az >
2026-03-12 16:52:37 +02:00
Hussein Galal and GitHub
cd72bcbc15
use apireader instead of client for node registration in mirror host node ( #686 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2026-03-10 17:43:42 +02:00
Enrico Candino and GitHub
9836f8376d
Added policy in Cluster Status ( #663 )
...
* initial implementation
restored policyName
* added test, fixed priority scheduling
* requested changes from review
- wrapped errors
- fixed some kube-api-linter issues to match k8s conventions
- moved policy namespace check in the same condition branch
2026-02-17 16:15:13 +01:00
Andreas Kupries
c94f7c7a30
fix: switch ControllerReferences over to OwnerReferences
2026-02-17 11:01:21 +01:00
Enrico Candino and GitHub
0164c785ab
Show correct allocatable resources when a Policy is applied ( #638 )
...
* wip
* wip
* wip
* fix lint and tests
* fixed bugs for missing resources
* cleanup and refactor
* removed coreClient from configureNode
* added comments to distribute algorithm
2026-01-27 15:56:37 +01:00
Enrico Candino and GitHub
ccc3d1651c
Fixed resource allocation fetching the stats from the node where the ( #610 )
...
virtual-kubelet is running on.
Removed random node selection during Pod creation.
2026-01-16 13:23:18 +01:00
Hussein Galal and GitHub
0086d5aa4a
Attach creation of Pseudo PV to the PVC instead of the pods ( #577 )
...
* Change creation of pseudo PV to PVC instead of pods
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Ignore not found pvs when deleting the pvc
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Avoid returning when the PV already exists
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-12-15 17:27:30 +02:00
Enrico Candino and GitHub
c9bb1bcf46
Fixed CreatePod and UpdatePod in Virtual Kubelet for Downward API ( #573 )
...
* wip
* fix lint
* ephemerals container
* remove unused
* add retry
* volumes refactor
* added configmap and secret keyRef translation
* set debug logger to virtual kubelet logger
* added tests
* fix lint, removed unused func
* added test file locally
2025-12-10 13:47:34 +01:00
Enrico Candino and GitHub
5c49c3d6b7
Fix create events rbac ( #575 )
...
* cleanup logs in kubelet provider
* added events create rbac to kubelet
* fix lint, moved fetch pod logic in separate func
2025-11-25 13:48:04 +01:00
Enrico Candino and GitHub
7144cf9e66
Moved CRDs to Helm templates folder ( #552 )
...
* moved CRDs of Cluster and VirtualClusterPolicy
Updated the generate script to output CRDs to the correct directory and include the keep resource policy annotation.
* fix crd directory in tests
2025-11-11 16:22:56 +01:00
Enrico Candino and GitHub
af9e1d6ca7
Cleanup orphaned resources after Cluster deletion ( #540 )
...
* adding controller reference for garbage collection, delete API lease
* added test
* fix lint
2025-10-31 15:25:38 +01:00
Enrico Candino and GitHub
bf70e0d171
Updated Cluster and VirtualClusterPolicy spec for sync and loadbalancer ( #528 )
...
* add default false for ingress and priorityClass, cleanup tests and added new tests
* fix typo for loadBalancer
* fix test aligning VirtualClusterPolicy SyncConfig
* set required enabled field, revert pointer on optional SyncConfig
* update samples
2025-10-24 17:02:26 +02:00
Enrico Candino and GitHub
cebf6594c4
switch to text log as default ( #529 )
2025-10-24 13:42:41 +02:00
Hussein Galal and GitHub
730e4e1c79
Fix pseudo PV deletion ( #511 )
...
* Fix pseudo PV deletion
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fix pseudo PV deletion
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-10-18 00:56:50 +02:00
Enrico Candino and GitHub
8ffdc9bafd
renaming webhook ( #506 )
2025-10-13 17:25:17 +02:00
Enrico Candino and GitHub
594c2571c3
promoted v1alpha1 resources to v1beta1 ( #505 )
2025-10-13 17:24:56 +02:00
Enrico Candino and GitHub
00ef6d582c
Add log-format, and cleanup ( #494 )
...
* using logr.Logger
* testing levels
* adding log format
* fix lint
* removed tests
* final cleanup
2025-10-08 13:19:57 +02:00
Enrico Candino and GitHub
5c95ca3dfa
Fix for pod eviction in host cluster ( #484 )
...
* update statefulset controller
* fix for single pod
* adding pod controller
* added test
* removed comment
* merged service controller
* revert statefulset
* added test
* added common owner filter
2025-10-03 16:22:54 +02:00
Hussein Galal and GitHub
0bd681ab60
Lb service status sync ( #451 )
...
* Sync service LB status back to virtual service
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Sync service LB status back to virtual service
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-10-01 13:25:31 +03:00
Hussein Galal and GitHub
aca01127f8
Fix PVC sync and sync defaults ( #458 )
...
* Fix PVC sync and sync defaults
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fix PVC sync and sync defaults
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fixes to pvc sync
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* increase the timeout on the e2e test
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* configure the syncConfig correctly in vcp
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* update docs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix policy unit test
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* revert timeout of the test to 20 second
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-09-16 13:01:12 +03:00
Hussein Galal and GitHub
caf785f23b
Add resources sync configuration ( #431 )
...
* Add resources sync configuration
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* update docs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* refactor cluster sync
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* simplify the syncerContext
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* simplify the syncerContext
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* drop the ClusterClient struct
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fix updates to syncer
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* lint
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* refactor secrets/configmaps sync
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* refactor secrets/configmaps sync
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* docs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Add imagepullsecret translation
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix test
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* add exception for deleted resources
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* linting fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* remove the option to disable imagepullsecret translation
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-09-01 14:34:29 +03:00
Hussein Galal and GitHub
b3f7a8ab7f
Fix subpath field ( #441 )
...
* Fix pod fieldpath annotation translation (#434 )
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix overrideEnvVars
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* remove extra comment
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
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 >
* fix merge env vars
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fix test
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-09-01 11:10:31 +03:00
Hussein Galal and GitHub
6db88b5a00
Revert "Fix pod fieldpath annotation translation ( #434 )" ( #435 )
...
This reverts commit 883d401ae3 .
2025-08-18 14:28:19 +03:00
Hussein Galal and GitHub
883d401ae3
Fix pod fieldpath annotation translation ( #434 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-08-18 09:16:58 +03:00
Enrico Candino and GitHub
084701fcd9
Migrate from urfave/cli to cobra ( #426 )
...
* wip
* env var fix
* cluster create
* cluster create and delete
* cluster list
* cluster cmd
* kubeconfig
* policy create
* policy delete and list, and added root commands
* removed urfavecli from k3kcli
* fix policy command
* k3k-kubelet to cobra
* updated docs
* updated go.mod
* updated test
* added deletion
* added cleanup and flake attempts
* wip bind env
* simplified config
2025-07-24 16:49:40 +02:00
Enrico Candino and GitHub
98d17cdb50
Added new golangci-lint formatters ( #425 )
...
* add gci formatter
* gofmt and gofumpt
* rewrite rule
* added make fmt
2025-07-22 10:42:41 +02:00
Enrico Candino and GitHub
2047a600ed
Migrate golangci-lint to v2 ( #424 )
...
* golangci-lint upgrade
* fix lint
2025-07-22 10:10:26 +02:00
Hussein Galal and GitHub
fcc875ab85
Mirror host nodes ( #389 )
...
* mirror host nodes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* add mirror host nodes feature
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Add controllername to secrets/configmap syncer
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* golint
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* build docs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* setting controller namespace env
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix typo
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Add a controller_namespace env to the test
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix tests
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix tests
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Add mirrorHostNodes spec to conformance tests
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* Fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* wsl
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* change the ptr int to int
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
* fix map key name
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
---------
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com >
2025-07-08 14:48:24 +03:00
Enrico Candino and GitHub
bf82318ad9
Add PriorityClass reconciler (virtual cluster -> host) ( #377 )
...
* added priorityclass controller
* added priorityClass controller tests
* fix for update priorityClass
* fix system skip priorityclass
* fix name
2025-07-01 11:03:14 +02:00
Enrico Candino and GitHub
54ae8d2126
add named controller ( #394 )
2025-06-24 23:56:14 +02:00
Enrico Candino and GitHub
eca219cb48
kubelet controllers cleanup ( #376 )
2025-06-20 12:08:28 +02:00