monocular
Monocular is a search and discovery front end for Helm Charts Repositories.
About this chart
Monocular
Monocular is web-based UI for managing Kubernetes applications packaged as Helm Charts. It allows you to search and discover available charts from multiple repositories, and install them in your cluster with one click.
TL;DR;
$ helm repo add monocular https://helm.github.io/monocular
$ helm install monocular/monocular
Introduction
This chart bootstraps a Monocular deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
Nginx Ingress controller
To avoid issues with Cross-Origin Resource Sharing, the Monocular chart sets up an Ingress resource to serve the frontend and the API on the same domain. This is used to route requests made to <host>:<port>/ to the frontend pods, and <host>:<port>/api to the backend pods.
It is possible to run Monocular on separate domains and without the Nginx Ingress controller, see the configuration section on how to do this.
Installing the Chart
First, ensure you have added the Monocular chart repository:
$ helm repo add monocular https://helm.github.io/monocular
To install the chart with the release name my-release:
$ helm install --name my-release monocular
The command deploys Monocular on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
See the values for the full list of configurable values.
Pointing to a different namespace
If tiller is not running in default namespace kube-system, you can provide the correct namespace with the following:
$ helm install monocular/monocular --set api.config.tillerNamespace=YOUR_NAMESPACE
Disabling Helm releases (deployment) management
If you want to run Monocular without giving the option to install and manage charts in your cluster, similar to KubeApps you can configure api.config.releasesEnabled:
$ helm install monocular/monocular --set api.config.releasesEnabled=false
Configuring chart repositories
You can configure the chart repositories you want to see in Monocular with the api.config.repos value, for example:
$ cat > custom-repos.yaml <<<EOF
api:
config:
repos:
- name: stable
url: https://kubernetes-charts.storage.googleapis.com
source: https://github.com/kubernetes/charts/tree/master/stable
- name: incubator
url: https://kubernetes-charts-incubator.storage.googleapis.com
source: https://github.com/kubernetes/charts/tree/master/incubator
- name: monocular
url: https://helm.github.io/monocular
source: https://github.com/helm/monocular/tree/master/charts
EOF
$ helm install monocular/monocular -f custom-repos.yaml
Serve Monocular on a single domain
You can configure the Ingress object with the hostnames you wish to serve Monocular on:
$ cat > custom-domains.yaml <<<EOF
ingress:
hosts:
- monocular.local
EOF
$ helm install monocular/monocular -f custom-domains.yaml
Serve Monocular frontend and API on different domains
In order to serve the frontend and the API on different domains, you need to configure the frontend with the API location and configure CORS correctly for the API to accept requests from the frontend.
To do this, you can use the ui.backendHostname and api.config.cors.allowed_origins values. You should also disable the Ingress resource and manually configure each hostname to point to the pods.
$ cat > separate-domains.yaml <<<EOF
ingress:
enabled: false
api:
config:
cors:
allowed_origins:
- http://$FRONTEND_HOSTNAME
ui:
backendHostname: http://$API_HOSTNAME
EOF
$ helm install monocular/monocular -f separate-domains.yaml
Ensure that you replace $FRONTEND_HOSTNAME and $API_HOSTNAME with the hostnames you want to use.
Other configuration options
| Value | Description | Default |
|---|---|---|
api.livenessProbe.initialDelaySeconds | Increase this if the API pods are crashing due to the chart repository sync taking too long | 180 |
api.config.releasesEnabled | Enable installing and managing charts in the cluster | true |
api.config.cacheRefreshInterval | How often to sync with chart repositories | 3600 |
api.nodeSelector | Node labels for pod assignment | {} |
api.tolerations | Tolerations for pod assignment | [] |
api.affinity | Node/Pod affinities | {} |
ui.googleAnalyticsId | Google Analytics ID | UA-XXXXXX-X (unset) |
ui.appName | Name to use in title bar and header | Monocular |
ui.nodeSelector | Node labels for pod assignment | {} |
ui.tolerations | Tolerations for pod assignment | [] |
ui.affinity | Node/Pod affinities | {} |
ingress.enabled | If enabled, create an Ingress object | true |
ingress.annotations | Ingress annotations | {ingress.kubernetes.io/rewrite-target: /, kubernetes.io/ingress.class: nginx} |
ingress.tls | TLS configuration for the Ingress object | nil |
Deploy monocular with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has monocular on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmonocular is pinned at v0.6.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply