What the Helm is Monocular?

Miguel Martinez Trivino

Making container-based applications easier to deploy on Kubernetes is the mission of Helm, which has done a great job of creating a package manager for Kubernetes applications.

In addition, the Helm project has created a set of definitions to make it easier to deploy and configure applications on Kubernetes (Helm Charts). Helm Charts make installing new applications on Kubernetes as easy as running helm install <chart-name>.

However, discovering available Helm Charts, and important details about them, is not as easy as it could be.

Enter Monocular, an open source search and discovery front-end for Helm Chart repositories, developed by Bitnami and Deis. Monocular is part of the Helm project and aims to provide a better way to find apps that have been packaged in Helm Charts.

Ingestor: Currently, Monocular is configured to index the Stable and Incubator official chart repositories. Checking for new or updated content every 15 minutes.

Metadata processor: During the repository ingestion, some assets are processed and stored locally. For example, we download the chart Icon, process it to match our format requirements and then store those results in the filesystem cache.

JSON API: Once a repository is indexed, the Charts and its versions get exposed via a JSON API. You can find the API Swagger spec here.

Static assets web server: Readme Files and icons are exposed via the backends built in http server under the /assets prefix.

API call examples:

Get all charts:

https://kubeapps.com/api/v1/charts

Get all charts from the stable repository:

https://kubeapps.com/api/v1/charts/stable

Get the versions for Wordpress

https://kubeapps.com/api/v1/charts/stable/wordpress/versions

Download Wordpress Readme file

https://kubeapps.com/api/assets/stable/wordpress/0.4.2/README.md

Frontend:

The frontend is a Web UI focused on application discoverability via repository listing, chart version information and search capabilities.

Highlights:

Angular2 single page application bootstrapped using Angular CLI and built on top of Webpack.

At deployment time, the code is built using –aot and –production flags and bundled with an NGINX web server.

Components:

The UI implements three main sections:

Charts listing: To be able to get a list of all the charts or filtered by repository.

Charts search: Search engine capable of match the query with some of the existing metadata like name, description, maintainers, keywords and so on.
Chart details: To be able to get the Readme information for a specific chart along with its versions, installation instructions and other metadata.

Continuous integration

The Monocular repository is configured to use Travis to perform a set of integration tasks on every pull request. For both the backend and the frontend code we run its tests, expose its coverage and build its production assets.

How do I deploy Monocular in my cluster?

Monocular is available as a Helm Chart and can be deployed in your Kubernetes cluster following these instructions.

Developing locally on Monocular

It’s easy to run Monocular locally by using the Docker Compose file and instructions you can find here.