From d97baf1627fbc5120c0ee9f1a7af51a4874bd1d8 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sat, 2 May 2020 11:19:57 +0100 Subject: [PATCH] Added helm operator --- terraform/kubernetes-charts.tf | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 terraform/kubernetes-charts.tf diff --git a/terraform/kubernetes-charts.tf b/terraform/kubernetes-charts.tf new file mode 100644 index 0000000..4a8c5f9 --- /dev/null +++ b/terraform/kubernetes-charts.tf @@ -0,0 +1,41 @@ +provider "helm" { + kubernetes { + load_config_file = false + host = scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].host + token = scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].token + cluster_ca_certificate = base64decode( + scaleway_k8s_cluster_beta.k8s-cluster.kubeconfig[0].cluster_ca_certificate + ) + } +} + +data "helm_repository" "stable" { + name = "stable" + url = "https://kubernetes-charts.storage.googleapis.com" +} + +data "helm_repository" "fluxcd" { + name = "fluxcd" + url = "https://charts.fluxcd.io" +} + +resource "helm_release" "helm-operator" { + name = "helm-operator" + repository = data.helm_repository.fluxcd.metadata[0].name + chart = "helm-operator" + + max_history = 4 + + set { + name = "helm.versions" + value = "v3" + } + + set { + name = "createCRD" + value = "false" + } +} + + +