Difference between revisions of "Terraform resource: helm release"

From wikieduonline
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
   name      = "nginx-ingress"
 
   name      = "nginx-ingress"
 
   namespace  = "nginx-ingress"
 
   namespace  = "nginx-ingress"
 +
  chart      = "[[oci:]]//[[ghcr.io]]/nginxinc/charts/nginx-ingress"
 +
}
 +
 +
resource "helm_release" "[[helm install argocd|argocd]]" {
 +
  name      = "argocd"
 +
  namespace  = "argocd"
 
   chart      = "[[oci:]]//[[ghcr.io]]/nginxinc/charts/nginx-ingress"
 
   chart      = "[[oci:]]//[[ghcr.io]]/nginxinc/charts/nginx-ingress"
 
  }
 
  }
Line 71: Line 77:
 
* <code>[[Error: unable to build kubernetes objects]]</code>
 
* <code>[[Error: unable to build kubernetes objects]]</code>
 
* <code>[[Error: XXXXX has no deployed releases]]</code>
 
* <code>[[Error: XXXXX has no deployed releases]]</code>
 +
* [[Error: could not download chart]]
  
 
== Related ==
 
== Related ==
 
* <code>[[set]]</code>
 
* <code>[[set]]</code>
* <code>[[helm install]]</code>
+
* <code>[[helm install]], [[helm install --timeout|--timeout]]</code>
 +
* <code>[[helm list]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 15:33, 16 July 2024

helm_release [1]

wait
wait_for_jobs

Official examples[edit]

resource "helm_release" "example" {
  name  = "redis"
  chart = "https://charts.bitnami.com/bitnami/redis-10.7.16.tgz"
}
resource "helm_release" "nginx-ingress" {
 name       = "nginx-ingress"
 namespace  = "nginx-ingress"
 chart      = "oci://ghcr.io/nginxinc/charts/nginx-ingress"
}
resource "helm_release" "argocd" {
 name       = "argocd"
 namespace  = "argocd"
 chart      = "oci://ghcr.io/nginxinc/charts/nginx-ingress"
}
resource "helm_release" "example" {
  name       = "my-redis-release"
  repository = "https://charts.bitnami.com/bitnami"
  chart      = "redis"
  version    = "6.0.1"

  values = [
    "${file("values.yaml")}"
  ]

  set {
    name  = "cluster.enabled"
    value = "true"
  }

  set {
    name  = "metrics.enabled"
    value = "true"
  }

  set {
    name  = "service.annotations.prometheus\\.io/port"
    value = "9127"
    type  = "string"
  }
}
resource "helm_release" "example" {
 name        = "testchart"
 namespace   = "helm_registry"
 repository  = "oci://localhost:5000/helm-charts"
 version     = "1.2.3"
 chart       = "test-chart"
}
resource "helm_release" "sentinelone" {
 name             = "sentinelone"
 repository       = "https://charts.sentinelone.com"
 chart            = "s1-agent"
 namespace        = "sentinelone"
 version          = "23.x.x"
 create_namespace = true
 wait             = false
 lint             = true
 timeout          = 900
 wait_for_jobs    = false
.../...
 resource "helm_release" "grafana" {
 name             = "grafana"
 create_namespace = true
 namespace        = "grafana"
 repository       = "https://grafana.github.io/helm-charts"
 chart            = "grafana"

 set {
   name  = "ingress.enabled"
   value = "true"
 }
 set_list {
   name  = "ingress.hosts"
   value = ["example.com"]
 }
 set {
   name  = "ingress.ingressClassName"
   value = "nginx"
 }
 set {
   name  = "ingress.tls"
   value = "true"
 }
}

Errors[edit]

Related[edit]

See also[edit]

  • https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release
  • Advertising: