Skip to content

Commit

Permalink
Merge pull request #14 from wahab-io/main
Browse files Browse the repository at this point in the history
feat: Adding apache pinot support
  • Loading branch information
vara-bonthu authored Oct 10, 2023
2 parents b34b9f1 + b231a84 commit 1277119
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ module "eks_data_addons" {
| [helm_release.kuberay_operator](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.mlflow_tracking](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.nvidia_gpu_operator](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.pinot](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.spark_history_server](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.spark_operator](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.strimzi_kafka_operator](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
Expand Down Expand Up @@ -135,6 +136,7 @@ module "eks_data_addons" {
| <a name="input_enable_kuberay_operator"></a> [enable\_kuberay\_operator](#input\_enable\_kuberay\_operator) | Enable Kuberay Operator add-on | `bool` | `false` | no |
| <a name="input_enable_mlflow_tracking"></a> [enable\_mlflow\_tracking](#input\_enable\_mlflow\_tracking) | Enable MLflow Tracking add-on | `bool` | `false` | no |
| <a name="input_enable_nvidia_gpu_operator"></a> [enable\_nvidia\_gpu\_operator](#input\_enable\_nvidia\_gpu\_operator) | Enable NVIDIA GPU Operator add-on | `bool` | `false` | no |
| <a name="input_enable_pinot"></a> [enable\_pinot](#input\_enable\_pinot) | Enable Apache Pinot Add-On | `bool` | `false` | no |
| <a name="input_enable_spark_history_server"></a> [enable\_spark\_history\_server](#input\_enable\_spark\_history\_server) | Enable Spark History Server add-on | `bool` | `false` | no |
| <a name="input_enable_spark_operator"></a> [enable\_spark\_operator](#input\_enable\_spark\_operator) | Enable Spark on K8s Operator add-on | `bool` | `false` | no |
| <a name="input_enable_strimzi_kafka_operator"></a> [enable\_strimzi\_kafka\_operator](#input\_enable\_strimzi\_kafka\_operator) | Enable the Strimzi Kafka Operator | `bool` | `false` | no |
Expand All @@ -147,6 +149,7 @@ module "eks_data_addons" {
| <a name="input_mlflow_tracking_helm_config"></a> [mlflow\_tracking\_helm\_config](#input\_mlflow\_tracking\_helm\_config) | MLflow Tracking add-on Helm Chart config | `any` | `{}` | no |
| <a name="input_nvidia_gpu_operator_helm_config"></a> [nvidia\_gpu\_operator\_helm\_config](#input\_nvidia\_gpu\_operator\_helm\_config) | Helm configuration for NVIDIA GPU Operator | `any` | `{}` | no |
| <a name="input_oidc_provider_arn"></a> [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | The ARN of the cluster OIDC Provider | `string` | n/a | yes |
| <a name="input_pinot_helm_config"></a> [pinot\_helm\_config](#input\_pinot\_helm\_config) | Apache Pinot Helm Chart config | `any` | `{}` | no |
| <a name="input_spark_history_server_helm_config"></a> [spark\_history\_server\_helm\_config](#input\_spark\_history\_server\_helm\_config) | Helm configuration for Spark History Server | `any` | `{}` | no |
| <a name="input_spark_operator_helm_config"></a> [spark\_operator\_helm\_config](#input\_spark\_operator\_helm\_config) | Helm configuration for Spark K8s Operator | `any` | `{}` | no |
| <a name="input_strimzi_kafka_operator_helm_config"></a> [strimzi\_kafka\_operator\_helm\_config](#input\_strimzi\_kafka\_operator\_helm\_config) | Helm configuration for Strimzi Kafka Operator | `any` | `{}` | no |
Expand All @@ -168,6 +171,7 @@ module "eks_data_addons" {
| <a name="output_kubecost"></a> [kubecost](#output\_kubecost) | Kubecost Helm Chart metadata |
| <a name="output_kuberay_operator"></a> [kuberay\_operator](#output\_kuberay\_operator) | Kuberay Operator Helm Chart metadata |
| <a name="output_nvidia_gpu_operator"></a> [nvidia\_gpu\_operator](#output\_nvidia\_gpu\_operator) | Nvidia GPU Operator Helm Chart metadata |
| <a name="output_pinot"></a> [pinot](#output\_pinot) | Apache Pinot Helm Chart metadata |
| <a name="output_spark_history_server"></a> [spark\_history\_server](#output\_spark\_history\_server) | Spark History Server Helm Chart metadata |
| <a name="output_spark_operator"></a> [spark\_operator](#output\_spark\_operator) | Spark Operator Helm Chart metadata |
| <a name="output_strimzi_kafka_operator"></a> [strimzi\_kafka\_operator](#output\_strimzi\_kafka\_operator) | Strimzi Kafka Operator Helm Chart metadata |
Expand Down
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,8 @@ output "dask_hub" {
value = try(helm_release.daskhub[0].metadata, null)
description = "Dask Hub Helm Chart metadata"
}

output "pinot" {
value = try(helm_release.pinot[0].metadata, null)
description = "Apache Pinot Helm Chart metadata"
}
68 changes: 68 additions & 0 deletions pinot.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
locals {
pinot_name = "pinot"
pinot_repo = "https://raw.githubusercontent.com/apache/pinot/master/helm"
pinot_version = "0.2.7"
}

resource "helm_release" "pinot" {
count = var.enable_pinot ? 1 : 0

name = try(var.pinot_helm_config, local.pinot_name)
repository = try(var.pinot_helm_config["repository"], local.pinot_repo)
chart = try(var.pinot_helm_config["chart"], "pinot")
version = try(var.pinot_helm_config["version"], local.pinot_version)
timeout = try(var.pinot_helm_config["timeout"], 300)
values = try(var.pinot_helm_config["values"], null)
create_namespace = try(var.pinot_helm_config["create_namespace"], true)
namespace = try(var.pinot_helm_config["namespace"], local.pinot_name)
lint = try(var.pinot_helm_config["lint"], false)
description = try(var.pinot_helm_config["description"], "")
repository_key_file = try(var.pinot_helm_config["repository_key_file"], "")
repository_cert_file = try(var.pinot_helm_config["repository_cert_file"], "")
repository_username = try(var.pinot_helm_config["repository_username"], "")
repository_password = try(var.pinot_helm_config["repository_password"], "")
verify = try(var.pinot_helm_config["verify"], false)
keyring = try(var.pinot_helm_config["keyring"], "")
disable_webhooks = try(var.pinot_helm_config["disable_webhooks"], false)
reuse_values = try(var.pinot_helm_config["reuse_values"], false)
reset_values = try(var.pinot_helm_config["reset_values"], false)
force_update = try(var.pinot_helm_config["force_update"], false)
recreate_pods = try(var.pinot_helm_config["recreate_pods"], false)
cleanup_on_fail = try(var.pinot_helm_config["cleanup_on_fail"], false)
max_history = try(var.pinot_helm_config["max_history"], 0)
atomic = try(var.pinot_helm_config["atomic"], false)
skip_crds = try(var.pinot_helm_config["skip_crds"], false)
render_subchart_notes = try(var.pinot_helm_config["render_subchart_notes"], true)
disable_openapi_validation = try(var.pinot_helm_config["disable_openapi_validation"], false)
wait = try(var.airflow_helm_config["wait"], false) # This is critical setting. Check this issue -> https://github.com/hashicorp/terraform-provider-helm/issues/683
wait_for_jobs = try(var.pinot_helm_config["wait_for_jobs"], false)
dependency_update = try(var.pinot_helm_config["dependency_update"], false)
replace = try(var.pinot_helm_config["replace"], false)

postrender {
binary_path = try(var.pinot_helm_config["postrender"], "")
}

dynamic "set" {
iterator = each_item
for_each = try(var.pinot_helm_config["set"], [])

content {
name = each_item.value.name
value = each_item.value.value
type = try(each_item.value.type, null)
}
}

dynamic "set_sensitive" {
iterator = each_item
for_each = try(var.pinot_helm_config["set_sensitive"], [])

content {
name = each_item.value.name
value = each_item.value.value
type = try(each_item.value.type, null)
}
}

}
15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,18 @@ variable "emr_flink_operator_helm_config" {
type = any
default = {}
}

#---------------------------------------------------
# Apache Pinot
#---------------------------------------------------
variable "enable_pinot" {
description = "Enable Apache Pinot Add-On"
type = bool
default = false
}

variable "pinot_helm_config" {
description = "Apache Pinot Helm Chart config"
type = any
default = {}
}

0 comments on commit 1277119

Please sign in to comment.