sysbox icon indicating copy to clipboard operation
sysbox copied to clipboard

Add custom CRI-O configuration for k8s installation

Open jonathanbeber opened this issue 1 year ago • 3 comments

To integrate sysbox with other tooling it would be nice to be able to have a custom CRI-O config.

I'd like, for example, to integrate sysbox with the Stargz Snapshotter in an automated way.

This issue aims to discuss whether it's possible to include extra config files during sysbox installation to the CRI-O service and track work on documenting that.

jonathanbeber avatar Jan 15 '24 14:01 jonathanbeber

Hello,

I could also think of other ways of achieving that like, an option to do not install CRI-O and assume it's already installed and configured on the nodes.

I'd be happy to work on changes on the installer, test it and document if you point me in some direction that you believe makes sense to the project.

Thanks in advance!

jonathanbeber avatar Jan 15 '24 14:01 jonathanbeber

Hi @jonathanbeber, thanks for giving Sysbox a shot.

In general, we definitely need a mechanism to pass configs to sysbox-deploy-k8s (maybe using a K8s configMap?), so that users can configure CRI-O or Sysbox. We just haven't had the cycles to do it yet.

I'd be happy to work on changes on the installer, test it and document if you point me in some direction that you believe makes sense to the project.

That would be great, much appreciated!

The sysbox-deploy-k8s code is here, particularly in this script.

That script runs inside a privileged pod (one per K8s node), and installs CRI-O and Sysbox on the node.

At a high level, we could use a K8s configMap and have that script consume the key:value pairs from the configMap to read the user's desired config.

Initially you can add the CRI-O config(s) you need to the configMap, and then later we can extend that to other configs as needed.

Let me know if this makes sense.

Thanks again!

ctalledo avatar Jan 15 '24 18:01 ctalledo

BTW, you can test your changes by running make sysbox-deploy-k8s-image in this directory. That creates a Docker image for the sysbox-deploy-k8s daemonset. You can then push that image to your repo, and then deploy it on a K8s cluster by using a modified sysbox-install.yaml, where the image in that yaml should be changed to point to your repo.

ctalledo avatar Jan 15 '24 18:01 ctalledo