-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
96 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
resource "kubernetes_namespace" "rabbitmq" { | ||
metadata { | ||
name = var.namespace | ||
} | ||
} | ||
|
||
resource "helm_release" "rabbitmq" { | ||
name = "rabbitmq" | ||
namespace = kubernetes_namespace.rabbitmq.metadata[0].name | ||
chart = "rabbitmq" | ||
repository = var.helm_chart_repository | ||
version = var.helm_chart_version | ||
|
||
set { | ||
name = "image.rabbitmq.repository" | ||
value = var.docker_image.rabbitmq.image | ||
} | ||
|
||
set { | ||
name = "image.rabbitmq.tag" | ||
value = var.docker_image.rabbitmq.tag | ||
} | ||
|
||
set { | ||
name = "rabbitmq.service.type" | ||
value = var.service_type | ||
} | ||
|
||
set { | ||
name = "defaultUsername" | ||
value = "admin" | ||
} | ||
|
||
set { | ||
name = "defaultPassword" | ||
value = "admin" | ||
} | ||
|
||
# Parameter Description Default | ||
# image.rabbitmq.repository The image of RabbitMQ container rabbitmq | ||
# image.rabbitmq.tag The tag of the RabbitMQ image 3.8.1-alpine | ||
# image.rabbitmq.pullPolicy The pull policy of the RabbitMQ image IfNotPresent | ||
# extraPlugins Extra plugins enabled [] | ||
# extraConfigurations Extra configurations to append to rabbitmq.conf `` | ||
# advancedConfigurations advanced.config `` | ||
# defaultUsername The username of default user to interact with RabbitMQ admin | ||
# defaultPassword The password of default user to interact with RabbitMQ password | ||
# service.type The service type, can be ClusterIP, or NodePort ClusterIP | ||
|
||
} | ||
|
||
|
||
|
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,33 @@ | ||
# Namespace | ||
variable "namespace" { | ||
description = "Namespace for Chaos Mesh" | ||
type = string | ||
} | ||
|
||
variable "service_type" { | ||
description = "service type : ClusterIP,LoadBalancer,NodePort" | ||
type = string | ||
} | ||
|
||
# Docker image | ||
variable "docker_image" { | ||
description = "Docker image for RabbitMQ" | ||
type = object({ | ||
rabbitmq = object({ | ||
image = string | ||
tag = string | ||
}) | ||
}) | ||
} | ||
|
||
# Repository of Chaos Mesh helm chart | ||
variable "helm_chart_repository" { | ||
description = "Path to helm chart repository for Chaos Mesh" | ||
type = string | ||
} | ||
|
||
# Version of helm chart | ||
variable "helm_chart_version" { | ||
description = "Version of chart helm for Chaos Mesh" | ||
type = string | ||
} |
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,9 @@ | ||
terraform { | ||
required_version = ">= 1.0" | ||
required_providers { | ||
helm = { | ||
source = "hashicorp/helm" | ||
version = ">= 2.10.1" | ||
} | ||
} | ||
} |