Skip to content

Commit

Permalink
add Helm Chart for Apache SuperSet
Browse files Browse the repository at this point in the history
  • Loading branch information
tanawatpan committed Apr 23, 2023
1 parent b00cada commit 3ad05e2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions helm_superset.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
data "http" "values_yaml" {
url = "https://raw.githubusercontent.com/apache/superset/master/helm/superset/values.yaml"
}

resource "helm_release" "superset" {
name = "superset"
repository = "http://apache.github.io/superset"
chart = "superset"
namespace = "superset"
create_namespace = true

values = [data.http.values_yaml.response_body]

set {
name = "bootstrapScript"
value = <<-EOT
#!/bin/bash
pip3 install pyodbc JPype1
pip3 install sqlalchemy-drill
EOT
}

set_sensitive {
name = "adminUser.password"
value = var.superset_password
}

cleanup_on_fail = true
wait_for_jobs = true
timeout = 600
}
6 changes: 6 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ variable "web_domain" {
}
}

variable "superset_password" {
type = string
sensitive = true
description = "Superset admin password"
}

locals {
cluster_name = "hadoop"

Expand Down
14 changes: 14 additions & 0 deletions provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
provider "tls" {}

provider "http" {}

provider "google" {
project = var.project
region = var.region
Expand Down Expand Up @@ -27,3 +31,13 @@ provider "kubectl" {
)
load_config_file = false
}

provider "helm" {
kubernetes {
host = "https://${data.google_container_cluster.hadoop.endpoint}"
token = data.google_client_config.provider.access_token
cluster_ca_certificate = base64decode(
data.google_container_cluster.hadoop.master_auth[0].cluster_ca_certificate,
)
}
}

0 comments on commit 3ad05e2

Please sign in to comment.