Anchore Engine Helm Chart Changes

Image for post
Image for post

As part of my upcoming article about installing Anchore Engine on OpenShift with Helm, I’ve made a couple of changes to the official anchore-engine helm chart (the blueprint for installing Anchore Engine on Kubernetes), which you can find here:

https://github.com/helm/charts/tree/master/stable/anchore-engine

The changes are related to the fact that I’m going to use the PostgreSQL database that comes as part of OpenShift. The chart is not correctly checking to see if we want to use an external database in a couple places. It is also defined as a formal dependency of the Anchore Engine chart, even though we can install the engine chart without installing the PostgreSQL chart.

First, I’m going to comment out the requirement of postgresql in requirements.yaml (or I could simply remove the requirements file), so that I don’t need it to run the chart:

Next, I’m going to modify the hardcoded value for the DB Host in the templates/core_deployment.yaml and templates/worker_deployment.yaml files so that it takes the postgresql.enabled flag into account (I don’t want the generated name that comes as part of the postgresql template — I want to use the postgresql.externalEndpoint value):

Finally, although the core_configmap.yaml checks the postresql.enabled flag, the worker_configmap.yaml does not:

I am going to change some values in the values.yaml to enable my external database and set the user, password, database name and database host:

The updated chart is available at https://github.com/openshiftninja/anchore-engine-helm.

Originally published on July 30, 2018.

Written by

I'm a technology enthusiast, always searching for better ways of doing things. Lately that has been all things React. I also write a lot on Medium. :)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store