-
Notifications
You must be signed in to change notification settings - Fork 44
feat(controller): add virtink infrastructure provider #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
We're happy when Kamaji can easily integrate with other community projects, and we're definitely open to this. However, I'm not sure the integration with virtink CAPI works without any issue, mostly due to this: Essentially, the provider takes for granted it has to create a Service for the Control Planes, however this is already managed by Kamaji. We have 2 options here:
|
|
Hi, Indeed I got into trouble with services and had to patch a little in order to make this cluster work. Reason is default control plane service does not have any endpoint: NAME ENDPOINTS AGE
capi-kamaji-virtink00 <none> 3m24s
capi-kamaji-virtink00-kcp 10.42.0.162:6443,10.42.0.163:6443,10.42.0.164:6443 + 3 more... 11d
kubernetes 172.19.34.189:6443 6d6hIn the example gist you may notice I superset the controlplane endpoint in order to get a working cluster: apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
...
controlPlaneEndpoint:
host: capi-kamaji-virtink00-kcp.default.svc
port: 6443I did try to tweak annotations with: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: VirtinkCluster
...
spec:
controlPlaneServiceTemplate:
metadata:
annotations:
cluster.x-k8s.io/managed-by: kamaji
namespace: defaultbut it did not help. Maybe there are some things I still dont' understand ? I'm new user of both Kamaji and virtink :) Please let me know if I can give more information to help you add virtink in Kamaji. PS: I also pushed up to date container images. Those are still work in progress and probably os container is sub-optimal in term of layers size but it should be good enough to help you test the gist I gave you. |
|
@jseguillon you have to disable using the annotation |
|
Hey thanks for the update. Could you please give me some pointers on source code related to
I'd like to dig more and maybe propose some patch on this solution for virtink. |
|
@jseguillon according to your changes, it seems you're missing RBAC to patch the Virtink cluster: cluster-api-control-plane-provider-kamaji/controllers/kamajicontrolplane_controller_cluster_patch.go Lines 136 to 137 in 17b9c2c
Once the entry is there, run |
virtink is a solution to deploy micro-vms in Kubernetes. It supports ClusterAPI.
It's a small project but it works very well and coupling it with Kamaji gives great results.
I propose to include it in Kamaji with this PR.