Skip to content

Commit

Permalink
Feat: 🚀 updated module as per certification-manager addon
Browse files Browse the repository at this point in the history
  • Loading branch information
VishwajitNagulkar committed Oct 4, 2023
1 parent edac12d commit 5ef4a1b
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,13 @@ module "keda" {
manage_via_gitops = var.manage_via_gitops
addon_context = local.addon_context
keda_extra_configs = var.keda_extra_configs
}

module "certification_manager" {
count = var.certification_manager ? 1 : 0
source = "./addons/cert-manager"
helm_config = var.certification_manager_helm_config != null ? var.certification_manager_helm_config : { values = [local_file.certification_manager_helm_config[count.index].content] }
manage_via_gitops = var.manage_via_gitops
addon_context = local.addon_context
certification_manager_extra_configs = var.certification_manager_extra_configs
}
14 changes: 14 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,18 @@ output "keda_chart_version" {
output "keda_repository" {
value = module.keda[*].repository
description = "Helm chart repository of the Keda."
}

#----------- CERTICATION-MANAGER ------------------------
output "certification_manager_namespace" {
value = module.certification_manager[*].namespace
description = "The namespace where ertification-manager is deployed."
}
output "certification_manager_chart_version" {
value = module.certification_manager[*].chart_version
description = "Chart version of the certification-manager Helm Chart."
}
output "certification_manager_repository" {
value = module.certification_manager[*].repository
description = "Helm chart repository of the certification-manager."
}
30 changes: 30 additions & 0 deletions override_values.tf
Original file line number Diff line number Diff line change
Expand Up @@ -633,4 +633,34 @@ resources:
memory: 150Mi
EOT
filename = "${path.module}/override_vales/keda.yaml"
}

#-----------CERTIFICATION-MANAGER--------------------
resource "local_file" "certification_manager_helm_config" {
count = var.certification_manager && (var.certification_manager_helm_config == null) ? 1 : 0
content = <<EOT
## Node affinity for particular node in which labels key is "Infra-Services" and value is "true"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "eks.amazonaws.com/nodegroup"
operator: In
values:
- "critical"
resources:
limits:
cpu: 200m
memory: 250Mi
requests:
cpu: 50m
memory: 150Mi
installCRDs: true
EOT
filename = "${path.module}/override_values/certification_manager.yaml"
}
20 changes: 19 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,22 @@ variable "keda_extra_configs" {
description = "Override attributes of helm_release terraform resource"
type = any
default = {}
}
}

#-----------CERTIFICATION-MANAGER----------------------
variable "certification_manager" {
description = "Enable certification_manager add-on"
type = bool
default = false
}

variable "certification_manager_helm_config" {
description = "Path to override-values.yaml for Certification Manager Chart"
type = any
default = null
}

variable "certification_manager_extra_configs" {
description = "Override attributes of helm_release terraform resource"
type = any
default = {}

0 comments on commit 5ef4a1b

Please sign in to comment.