Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(mc): Create helm-release module #1303

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ module "kind" {
}

module "prometheus" {
depends_on = [module.kind]
source = "../../../modules/prometheus"
depends_on = [module.kind]
source = "../../../modules/helm-release"
release_name = var.prometheus_release_name
repository_url = var.prometheus_repository_url
chart_version = var.prometheus_chart_version
chart_name = var.prometheus_chart_name
values = var.prometheus_values
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,45 @@ variable "prefix" {
type = string
default = "mc"
}

variable "prometheus_release_name" {
description = "The name of the Helm release."
type = string
default = "prometheus"
}

variable "prometheus_repository_url" {
description = "The URL of the Helm repository."
type = string
default = "https://prometheus-community.github.io/helm-charts"
}

variable "prometheus_chart_version" {
description = "The version of the Helm chart to install."
type = string
default = "68.4.3"
}

variable "prometheus_chart_name" {
description = "The name of the Helm chart to install."
type = string
default = "kube-prometheus-stack"
}

variable "prometheus_values" {
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
type = list(object({
name = string
value = string
}))
default = [
{
name = "global.prometheus.enabled"
value = "true"
},
{
name = "global.grafana.enabled"
value = "true"
}
]
}
11 changes: 7 additions & 4 deletions test/multicloud/examples/integration/retina-gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ module "gke" {
}

module "retina" {
depends_on = [module.gke]
source = "../../../modules/retina"
retina_version = var.retina_version
values = var.values
depends_on = [module.gke]
source = "../../../modules/helm-release"
release_name = var.retina_release_name
repository_url = var.retina_repository_url
chart_version = var.retina_chart_version
chart_name = var.retina_chart_name
values = var.retina_values
}
39 changes: 36 additions & 3 deletions test/multicloud/examples/integration/retina-gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,48 @@ variable "machine_type" {
default = "e2-standard-4"
}

variable "retina_version" {
description = "The tag to apply to all resources."
variable "retina_release_name" {
description = "The name of the Helm release."
type = string
default = "retina"
}

variable "values" {
variable "retina_repository_url" {
description = "The URL of the Helm repository."
type = string
default = "oci://ghcr.io/microsoft/retina/charts"
}

variable "retina_chart_version" {
description = "The version of the Helm chart to install."
type = string
default = "v0.0.24"
}

variable "retina_chart_name" {
description = "The name of the Helm chart to install."
type = string
default = "retina"
}

variable "retina_values" {
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
type = list(object({
name = string
value = string
}))
default = [
{
name = "image.tag"
value = "v0.0.24"
},
{
name = "operator.tag"
value = "v0.0.24"
},
{
name = "logLevel"
value = "info"
}
]
}
8 changes: 6 additions & 2 deletions test/multicloud/examples/integration/retina-kind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ module "kind" {

module "retina" {
depends_on = [module.kind]
source = "../../../modules/retina"
retina_version = var.retina_version
source = "../../../modules/helm-release"
release_name = var.retina_release_name
repository_url = var.retina_repository_url
chart_version = var.retina_chart_version
chart_name = var.retina_chart_name
values = var.retina_values
}
46 changes: 43 additions & 3 deletions test/multicloud/examples/integration/retina-kind/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,48 @@ variable "prefix" {
default = "mc"
}

variable "retina_version" {
description = "The tag to apply to all resources."
variable "retina_release_name" {
description = "The name of the Helm release."
type = string
default = "v0.0.23"
default = "retina"
}

variable "retina_repository_url" {
description = "The URL of the Helm repository."
type = string
default = "oci://ghcr.io/microsoft/retina/charts"
}

variable "retina_chart_version" {
description = "The version of the Helm chart to install."
type = string
default = "v0.0.24"
}

variable "retina_chart_name" {
description = "The name of the Helm chart to install."
type = string
default = "retina"
}

variable "retina_values" {
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
type = list(object({
name = string
value = string
}))
default = [
{
name = "image.tag"
value = "v0.0.24"
},
{
name = "operator.tag"
value = "v0.0.24"
},
{
name = "logLevel"
value = "info"
}
]
}
9 changes: 7 additions & 2 deletions test/multicloud/live/retina-aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ module "aks" {
}

module "retina" {
depends_on = [module.aks]
source = "../../modules/retina"
depends_on = [module.aks]
source = "../../modules/helm-release"
release_name = var.retina_release_name
repository_url = var.retina_repository_url
chart_version = var.retina_chart_version
chart_name = var.retina_chart_name
values = var.retina_values
}

output "kubeconfig_command" {
Expand Down
50 changes: 47 additions & 3 deletions test/multicloud/live/retina-aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,51 @@ variable "prefix" {
variable "labels" {
description = "A map of labels to add to all resources."
type = map(string)
default = {
"env" = "test"
}
default = {}
}

variable "retina_release_name" {
description = "The name of the Helm release."
type = string
default = "retina"
}

variable "retina_repository_url" {
description = "The URL of the Helm repository."
type = string
default = "oci://ghcr.io/microsoft/retina/charts"
}

variable "retina_chart_version" {
description = "The version of the Helm chart to install."
type = string
default = "v0.0.24"
}

variable "retina_chart_name" {
description = "The name of the Helm chart to install."
type = string
default = "retina"
}

variable "retina_values" {
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
type = list(object({
name = string
value = string
}))
default = [
{
name = "image.tag"
value = "v0.0.24"
},
{
name = "operator.tag"
value = "v0.0.24"
},
{
name = "logLevel"
value = "info"
}
]
}
9 changes: 7 additions & 2 deletions test/multicloud/live/retina-gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ module "gke" {
}

module "retina" {
depends_on = [module.gke]
source = "../../modules/retina"
depends_on = [module.gke]
source = "../../modules/helm-release"
release_name = var.retina_release_name
repository_url = var.retina_repository_url
chart_version = var.retina_chart_version
chart_name = var.retina_chart_name
values = var.retina_values
}
46 changes: 46 additions & 0 deletions test/multicloud/live/retina-gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,49 @@ variable "machine_type" {
type = string
default = "e2-standard-4"
}

variable "retina_release_name" {
description = "The name of the Helm release."
type = string
default = "retina"
}

variable "retina_repository_url" {
description = "The URL of the Helm repository."
type = string
default = "oci://ghcr.io/microsoft/retina/charts"
}

variable "retina_chart_version" {
description = "The version of the Helm chart to install."
type = string
default = "v0.0.24"
}

variable "retina_chart_name" {
description = "The name of the Helm chart to install."
type = string
default = "retina"
}

variable "retina_values" {
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
type = list(object({
name = string
value = string
}))
default = [
{
name = "image.tag"
value = "v0.0.24"
},
{
name = "operator.tag"
value = "v0.0.24"
},
{
name = "logLevel"
value = "info"
}
]
}
9 changes: 7 additions & 2 deletions test/multicloud/live/retina-kind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ module "kind" {
}

module "retina" {
depends_on = [module.kind]
source = "../../modules/retina"
depends_on = [module.kind]
source = "../../modules/helm-release"
release_name = var.retina_release_name
repository_url = var.retina_repository_url
chart_version = var.retina_chart_version
chart_name = var.retina_chart_name
values = var.retina_values
}
48 changes: 47 additions & 1 deletion test/multicloud/live/retina-kind/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,50 @@ variable "prefix" {
description = "A prefix to add to all resources."
type = string
default = "mc"
}
}

variable "retina_release_name" {
description = "The name of the Helm release."
type = string
default = "retina"
}

variable "retina_repository_url" {
description = "The URL of the Helm repository."
type = string
default = "oci://ghcr.io/microsoft/retina/charts"
}

variable "retina_chart_version" {
description = "The version of the Helm chart to install."
type = string
default = "v0.0.24"
}

variable "retina_chart_name" {
description = "The name of the Helm chart to install."
type = string
default = "retina"
}

variable "retina_values" {
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
type = list(object({
name = string
value = string
}))
default = [
{
name = "image.tag"
value = "v0.0.24"
},
{
name = "operator.tag"
value = "v0.0.24"
},
{
name = "logLevel"
value = "info"
}
]
}
Loading
Loading