Fixing the Auto-Generated Helm Chart
In this lesson, we will fix the auto-generated Helm chart by adding dependencies for MongoDB. Moreover, we will perform checks to confirm that the application is running.
Even though the code of the application is small, I will save you from going through it. Instead, I’ll let you know right away what’s missing and what parts of the chart need to be added or modified.
Adding DB
environment variable
First of all, the application requires an environment variable called DB
. The code is using it to obtain the address of the database. That brings us to the first thing missing in the chart generated by Jenkins X; there is no definition for MongoDB.
The first step is to open charts/go-demo-6/templates/deployment.yaml in your favorite editor. That’s where the Deployment for the application is defined, and that’s where we need to add the variable.
Please locate the code that follows.
Get hands-on with 1400+ tech skills courses.