From 6d99341250ccf606ce918ba93f2527057ef2a12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=BC=C3=9F?= Date: Mon, 27 May 2024 10:23:09 +0200 Subject: [PATCH] docs: add instructions for terraform installation --- deploy/helm/grafana-operator/README.md | 15 +++++++++++++++ deploy/helm/grafana-operator/README.md.gotmpl | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/deploy/helm/grafana-operator/README.md b/deploy/helm/grafana-operator/README.md index 3fa9abec7..7873b135b 100644 --- a/deploy/helm/grafana-operator/README.md +++ b/deploy/helm/grafana-operator/README.md @@ -19,6 +19,21 @@ helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-opera Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000). +### Using Terraform + +To install the helm chart using terraform, make sure you use the right values for `repository` and `name` as shown below: + +```hcl +resource "helm_release" "grafana_kubernetes_operator" { + name = "grafana-operator" + namespace = "default" + repository = "oci://ghcr.io/grafana/helm-charts" + chart = "grafana-operator" + verify = false + version = "v5.9.1" +} +``` + ## Upgrading Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions. diff --git a/deploy/helm/grafana-operator/README.md.gotmpl b/deploy/helm/grafana-operator/README.md.gotmpl index b74c04aed..8946c208f 100644 --- a/deploy/helm/grafana-operator/README.md.gotmpl +++ b/deploy/helm/grafana-operator/README.md.gotmpl @@ -19,6 +19,22 @@ helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-opera Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000). +### Using Terraform + +To install the helm chart using terraform, make sure you use the right values for `repository` and `name` as shown below: + +```hcl +resource "helm_release" "grafana_kubernetes_operator" { + name = "grafana-operator" + namespace = "default" + repository = "oci://ghcr.io/grafana/helm-charts" + chart = "grafana-operator" + verify = false + version = "{{ template "chart.appVersion" . }}" +} +``` + + ## Upgrading Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.