/terraform-helm-release

App release with terraform and helm

Primary LanguageHCLMIT LicenseMIT

Helm Release Module

Table Of Contents

Table of contents generated with markdown-toc

Usage example

Here's the gist of using it via github.

module jenkins {
  source  = "terraform-module/release/helm"
  version = "2.6.0"

  namespace  = "app-namespace"
  repository =  "https://charts.helm.sh/stable"

  app = {
    name          = "jenkins"
    version       = "1.5.0"
    chart         = "jenkins"
    force_update  = true
    wait          = false
    recreate_pods = false
    deploy        = 1
  }
  values = [templatefile("jenkins.yml", {
    region                = var.region
    storage               = "4Gi"
  })]

  set = [
    {
      name  = "labels.kubernetes\\.io/name"
      value = "jenkins"
    },
    {
      name  = "service.labels.kubernetes\\.io/name"
      value = "jenkins"
    },
  ]

  set_sensitive = [
    {
      path  = "master.adminUser"
      value = "jenkins"
    },
  ]
}

Module Variables

Requirements

Name Version
terraform >= 0.13
helm >= 2.0

Providers

Name Version
helm >= 2.0

Inputs

Name Description Type Default Required
app an application to deploy map(any) n/a yes
namespace namespace where to deploy an application string n/a yes
repository Helm repository string n/a yes
set Value block with custom STRING values to be merged with the values yaml.
list(object({
name = string
value = string
}))
null no
set_sensitive Value block with custom sensitive values to be merged with the values yaml that won't be exposed in the plan's diff.
list(object({
path = string
value = string
}))
null no
values Extra values list(string) [] no

Outputs

Name Description
deployment The state of the helm deployment

Commands

$ make help 
hooks                          Commit hooks setup
validate                       Validate with pre-commit hooks
changelog                      Update changelog 

Validate creation of components

kubectl get serviceaccount <name> -o yaml
kubectl get clusterrolebinding <name> -o yaml
kubectl get deploy <name> -o yaml

📝 Guidelines

  • 📝 Use a succinct title and description.
  • 🐛 Bugs & feature requests can be be opened
  • 📶 Support questions are better asked on Stack Overflow
  • 😊 Be nice, civil and polite (as always).

License

Copyright 2019 Ivan Katliarhcuk

MIT Licensed. See LICENSE for full details.

How to Contribute

Submit a pull request

Authors

Currently maintained by Ivan Katliarchuk and these awesome contributors.

ForTheBadge uses-git

Terraform Registry