-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: modular folder structure to install infra-helm-chart dependency
- Install Kafka dependency chart to the cluster defined in `KUBECONFIG` - 3 Kafka brokers - `healthcheck` topic with 3 partitions - `tfvars` to define `values.yaml` for the Helm chart Fixes issue #1
- Loading branch information
1 parent
d8b9e9f
commit 1d8d0fe
Showing
14 changed files
with
87 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
# Terraform Helm Provider | ||
|
||
This terraform code is to deploy Helm charts on GKE(GCP) cluster using terraform [`Terraform Helm Provider`](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | ||
This terraform code is to deploy Helm charts on GKE(GCP) cluster in prod OR minikube cluster locally using terraform [`Terraform Helm Provider`](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | ||
|
||
The helm chart installation cluster depends on the `kubernetes` `config_path` in the `helm` provider. | ||
|
||
```tf | ||
provider "helm" { | ||
kubernetes { | ||
config_path = "~/.kube/config" | ||
} | ||
} | ||
``` | ||
|
||
Based on the `KUBECONFIG` value, the helm chart will be installed on that particular cluster. | ||
|
||
> Due to an on-going issue with Terraform Helm Provider [[reference](https://github.com/hashicorp/terraform-provider-helm/issues/932)] which prevents the Terraform resource to pull a chart from a private GitHub repository (even after providing a GitHub PAT), we are forced to install the Helm chart locally. |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# https://github.com/hashicorp/terraform-provider-helm/issues/467#issuecomment-617856419 | ||
resource "helm_release" "infra_dependencies" { | ||
name = var.release_name | ||
namespace = var.namespace | ||
create_namespace = true | ||
repository = "https://github.com/csye7125-fall2023-group05/infra-helm-chart.git" | ||
chart = "${var.chart_path}/infra-helm-chart-1.1.0.tar.gz" | ||
wait = false # prevents "pending-install" helm install state | ||
version = "1.1.0" | ||
values = ["${file(var.values_file)}"] | ||
timeout = var.timeout | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
variable "namespace" {} | ||
variable "timeout" {} | ||
variable "values_file" {} | ||
variable "chart_path" {} | ||
variable "release_name" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,5 @@ override.tf.json | |
|
||
# variables | ||
dev.tfvars | ||
prod.tfvars | ||
prod.tfvars | ||
values.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# terraform { | ||
# backend "s3" { | ||
# bucket = "tfstate-sid" | ||
# key = "backend/infra-jenkins.tfstate" | ||
# region = "us-east-1" | ||
# dynamodb_table = "infra-state" | ||
# } | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace = "webapp" | ||
timeout = 600 | ||
values_file = "./values.yaml" | ||
chart_path = "../modules/infra_helm/charts" | ||
release_name = "infra-helm-release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module "infra_dependencies" { | ||
source = "../modules/infra_helm" | ||
namespace = var.namespace | ||
timeout = var.timeout | ||
values_file = var.values_file | ||
chart_path = var.chart_path | ||
release_name = var.release_name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
variable "namespace" { | ||
default = "default" | ||
type = string | ||
description = "Namespace in which to deploy the chart" | ||
} | ||
|
||
variable "timeout" { | ||
type = number | ||
description = "The max time to run the helm release" | ||
default = 30 | ||
} | ||
|
||
variable "values_file" { | ||
type = string | ||
description = "The path to the values.yaml file for the helm chart" | ||
default = "./values.yaml" | ||
} | ||
|
||
variable "chart_path" { | ||
type = string | ||
description = "The path to the charts/ directory to install local charts" | ||
default = "../modules/infra_helm/charts" | ||
} | ||
|
||
variable "release_name" { | ||
type = string | ||
description = "The name of the helm chart release" | ||
default = "infra-helm-release" | ||
} |
This file was deleted.
Oops, something went wrong.