Helm chart components allow you to deploy any helm from a public or connected repo. Please refer to the Helm reference for full configuration options.

Configuring a Helm component

To configure a Helm component, specify a repo, the required configuration values and version to deploy it with.

resource "nuon_helm_chart_chart_component" "helm_chart" {
  name   = "helm_chart"
  app_id = nuon_app.main.id
  helm_chart_version = "1.6.3"

  connected_repo = {
    directory = "helm_chart"
    repo      = "your-org/your-repo"
    branch    = "main"
  }
}

You can configure Helm components to use either a public repo (using a public_repo block) or a private GitHub repo (using a connected_repo block). Read more about VCS configuration here.

Open Source and Private Charts

Nuon supports any Helm chart that can be accessed using git. It is common for apps to have both a combination of public, open source helm charts for deploying standard components and private helm charts for application specific configuration.

Helm Value Configuration

One of the most important parts of deploying a Helm chart into a customer account, includes setting values properly. Values can be used for everything from accessing infrastructure, setting images or scaling pods.

Variables allow you to set default values for a Nuon app, expose customer configuration options, reference infrastructure from other components or access an image that was synced into the customer account.

Examples for accessing common interpolated variables:

// access a synced image
resource "nuon_helm_chart_component" "images" {
  name   = "images"
  app_id = nuon_app.main.id

  chart_name = "images"
  connected_repo = {
    directory = "chart"
    repo      = "your-org/your-repo"
    branch    = "main"
  }

  value {
    name = "image_repository"
    value = "{{.nuon.components.image.image.repository.uri}}"
  }
  value {
    name = "image_tag"
    value = "{{.nuon.components.image.image.tag}}"
  }
}

Helm Values Files

You can add a values file, and set multiple values at once.

[[components]]
name = "toml_helm"
type = "helm_chart"
chart_name = "e2e-helm"

[components.connected_repo]
directory = "deployment"
repo = "powertoolsdev/mono"
branch = "main"

[[components.values_file]]
contents = """
image.tag = {{.nuon.components.toml_docker_build.image.name}}
"""

For now, we do not support reading values files from disk. If this is something that would make your configuration easier, let us know!

Default Sandbox Components + DNS

The managed sandboxes for aws-eks ship with standard Helm components + DNS zones to solve for common use cases, such as exposing a public or private https service. This includes:

The sandboxes are open source and can be customized, if these components do not work for your application.

Using Domains

The Nuon managed sandboxes automatically deploy the components required to provision DNS, Certificate and Load Balancer resources using Helm.

An example provisioning an NLB, that uses an ACM certificate:

resource "nuon_helm_chart_component" "nlb" {
  name   = "nlb"
  app_id = nuon_app.main.id

  chart_name = "nlb"
  connected_repo = {
    directory = "chart"
    repo      = "your-org/your-repo"
    branch    = "main"
  }

  value {
    name = "nlbs.public_domain"
    value = "nlb.{{.nuon.install.public_domain}}"
  }

  value {
    name = "nlbs.public_domain_certificate_arn"
    value = "{{.nuon.components.infra.outputs.public_domain_certificate_arn}}"
  }
}

An example using cert-manager to provision a certificate, and using it with an Nginx Ingress:

resource "nuon_helm_chart_component" "nlb" {
  name   = "nlb"
  app_id = nuon_app.main.id

  chart_name = "nlb"
  connected_repo = {
    directory = "chart"
    repo      = "your-org/your-repo"
    branch    = "main"
  }

  value {
    name = "nlbs.public_domain"
    value = "nlb.{{.nuon.install.public_domain}}"
  }

  value {
    name = "nlbs.public_domain_certificate_arn"
    value = "{{.nuon.components.infra.outputs.public_domain_certificate_arn}}"
  }
}

By default, Nuon provisions a custom domain for each install under the nuon.run domain (eg: inl8ybt7gajofh33e0h3pqyw1t.nuon.run).

If you would like to use a customer provided domain, you can accept customer domains using inputs. We are planning to improve support for this, and would love to hear about your use case.