Difference between revisions of "Terraform resource: helm release"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
* https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release
+
<code>[[helm_release]]</code> <ref> https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release</ref>
  helm_release
+
 
 +
  [[wait]]
 +
[[wait_for_jobs]]
  
 
== Official examples ==
 
== Official examples ==
Line 6: Line 8:
 
   name  = "redis"
 
   name  = "redis"
 
   chart = "https://charts.bitnami.com/bitnami/redis-10.7.16.tgz"
 
   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" "[[helm install argocd|argocd]]" {
 +
  name      = "argocd"
 +
  namespace  = "argocd"
 +
  chart      = "[[oci:]]//[[ghcr.io]]/nginxinc/charts/nginx-ingress"
 
  }
 
  }
  
Line 36: Line 50:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
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
 +
.../...
 +
 +
{{helm_release grafana}}
 +
 +
== Errors ==
 +
* <code>[[Error: unable to build kubernetes objects]]</code>
 +
* <code>[[Error: XXXXX has no deployed releases]]</code>
 +
* [[Error: could not download chart]]
  
 
== Related ==
 
== Related ==
* <code>[[Error: unable to build kubernetes objects]]</code>
 
 
* <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 ==
* {{Helm}}
+
* {{resource helm_release}}
* {{Terraform providers}}
+
* {{tf helm}}
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

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: