Cruise Open Sources DSL Framework for Kubernetes

The bulk of the contributions being made to the open source Kubernetes ecosystem come from IT vendors. However, as IT organizations become more familiar with the platform, many of them are starting to make significant contributions.

Case in point is Cruise, a startup building autonomous vehicles, which has launched Isopod, an open source domain-specific language (DSL) framework designed to make it easier to configure multiple Kubernetes clusters.

Charles Xu, a software engineer at Cruise, says Cruise has employed Isopod to migrate add-ons and add new ones to multiple Kubernetes clusters. The result has been 80% faster rollouts and a 60% reduction in code size, thanks to reuse.

Instead of relying on YAML files, Isopod renders Kubernetes objects as Protocol Buffers (Protobufs) that can be consumed by the Kubernetes application programming interface (API). Kubernetes objects and cluster targets are scripted in Starlark, a Python dialect created by Google. Isopod extends Starlark with runtime built-ins to access services and utilities such as Vault secrets management, Kubernetes apiserver, HTTP requester, Base64 encoder and UUID generator to replace CLI dependencies. Isopod also uses a separate runtime for unit tests to mock all built-ins.

Application secrets are stored in Vault and queried at runtime. Isopod prohibits disk IO except for loading Starlark modules from other scripts, which means no external libraries can be loaded unless explicitly implemented as an Isopod built-in.

Xu says Isopod can be employed to roll out to multiple Kubernetes clusters in parallel as well as reclaim dangling Kubernetes objects. Isopod creates a ConfigMap to store the entire configuration applied and updates the ownerRefernce field of every object constructed in the rollout to point to the ConfigMap. By deleting the previous ConfigMap, Isopod also triggers the Kubernetes garbage collector to delete all objects automatically.

There is no shortage of tools for configuring Kubernetes such as Helm, but Xu says they all fall short for a variety of reasons, including being difficult to test, limited in terms of how much complex logic can be employed and being too dependent on a specific execution environment.

As Kubernetes continues to mature, it will be interesting to see how much the experience of end users shape the platform from here. There’s a lot of interest in not only making it easier to manage Kubernetes at scale but also making the platform more accessible to the average IT administrator. Isopod may be only one of several approaches to solving that problem to emanate from Kubernetes practitioners.

In the meantime, it’s clear that even in the absence of simple IT administration tools, the momentum surrounding Kubernetes continues to grow. However, the percentage of enterprise workloads running on Kubernetes remains comparatively slight, and there’s no doubt the complexity of the platform is one of the main reasons adoption rates have tended to be slow and steady. Isopod may not solve that issue for every class of IT administrators that may need to manage Kubernetes, but it does represent at the very least another step in the right direction.

Mike Vizard

Mike Vizard

Mike Vizard is a seasoned IT journalist with over 25 years of experience. He also contributed to IT Business Edge, Channel Insider, Baseline and a variety of other IT titles. Previously, Vizard was the editorial director for Ziff-Davis Enterprise as well as Editor-in-Chief for CRN and InfoWorld.

Mike Vizard has 660 posts and counting. See all posts by Mike Vizard