GuidesAPI Reference
Log In
Guides

Using Helm Charts

Use Helm to deploy Nginx

Prodvana supports Services defined using Helm Charts, a great way to bring an existing or external Service and take advantage of Prodvana's Dynamic Delivery engine.

In this tutorial, you will define a service using Helm charts.

Prerequisites

1. Create a nginx.pvn.yaml

First, let's create a simple nginx.pvn.yaml file for Prodvana to manage your Helm deployment.

service:
  name: nginx
  application: my-app
  helm:
    remote:
      repo: https://charts.bitnami.com/bitnami
      chart: bitnamicharts/nginx
      chartVersion: "14.2.1"

🚧

Prodvana will manage the namespace.

Prodvana is responsible for and will replace any namespace settings in Helm configs. This ensures resources are created in namespaces consistent with the selected Application and Release Channels.

3. Apply the Config File

Use pvnctl to apply the config file.

pvnctl configs apply nginx.pvn.yaml

4. Deploy Your Service

Navigate to the Prodvana UI at my-demo-organization.runprodvana.com -> Applications -> your app -> nginx to see your Service created. Click on deploy and follow the on-screen instructions to push for the first time. Once prompted, approve the push to production.

👍

Congratulations!

You have now deployed your first service using Helm through Prodvana.

5. Allowing Helm chart versions To Specified From The Web Interface

🚧

Continue if you want to enable web deployments!

You can stop here however you can expose parameters such as chart version in the UI to be changed.

Using Parameters to connect configuration to the web.

This can be achieved using parameters. This defines a new parameter, chartVersion, which can be set without changing the config file. You may reference the parameter via go templating variable.{{.Params.chartVersion}}.

Let's do so now in our C configs. Modify your nginx.pvn.yaml:

service:
  name: nginx
  application: my-app
  parameters:
    - name: chartVersion
      description: "Chart Version for Helm"
      string:
        defaultValue: "14.2.1"
  helm:
    remote:
      repo: https://charts.bitnami.com/bitnami
      chart: bitnamicharts/nginx
      chartVersion: "{{.Params.chartVersion}}"

Apply changes via the pvnctl command:

pvnctl configs apply nginx.pvn.yaml

6. Deploy Again

The Release UI will now show a field for thechartVersionparameter that you can set as needed.

Further Reading