Skip to content

Commit

Permalink
fix: Change default behavior of helm release resource to not wait for…
Browse files Browse the repository at this point in the history
… deployment (#175)
  • Loading branch information
bryantbiggs authored May 31, 2023
1 parent 58ead11 commit f2a3190
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 51 deletions.
55 changes: 30 additions & 25 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module "argo_rollouts" {
skip_crds = try(var.argo_rollouts.skip_crds, null)
render_subchart_notes = try(var.argo_rollouts.render_subchart_notes, null)
disable_openapi_validation = try(var.argo_rollouts.disable_openapi_validation, null)
wait = try(var.argo_rollouts.wait, null)
wait = try(var.argo_rollouts.wait, false)
wait_for_jobs = try(var.argo_rollouts.wait_for_jobs, null)
dependency_update = try(var.argo_rollouts.dependency_update, null)
replace = try(var.argo_rollouts.replace, null)
Expand Down Expand Up @@ -158,7 +158,7 @@ module "argo_workflows" {
skip_crds = try(var.argo_workflows.skip_crds, null)
render_subchart_notes = try(var.argo_workflows.render_subchart_notes, null)
disable_openapi_validation = try(var.argo_workflows.disable_openapi_validation, null)
wait = try(var.argo_workflows.wait, null)
wait = try(var.argo_workflows.wait, false)
wait_for_jobs = try(var.argo_workflows.wait_for_jobs, null)
dependency_update = try(var.argo_workflows.dependency_update, null)
replace = try(var.argo_workflows.replace, null)
Expand Down Expand Up @@ -212,7 +212,7 @@ module "argocd" {
skip_crds = try(var.argocd.skip_crds, null)
render_subchart_notes = try(var.argocd.render_subchart_notes, null)
disable_openapi_validation = try(var.argocd.disable_openapi_validation, null)
wait = try(var.argocd.wait, null)
wait = try(var.argocd.wait, false)
wait_for_jobs = try(var.argocd.wait_for_jobs, null)
dependency_update = try(var.argocd.dependency_update, null)
replace = try(var.argocd.replace, null)
Expand Down Expand Up @@ -269,7 +269,7 @@ module "aws_cloudwatch_metrics" {
skip_crds = try(var.aws_cloudwatch_metrics.skip_crds, null)
render_subchart_notes = try(var.aws_cloudwatch_metrics.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_cloudwatch_metrics.disable_openapi_validation, null)
wait = try(var.aws_cloudwatch_metrics.wait, null)
wait = try(var.aws_cloudwatch_metrics.wait, false)
wait_for_jobs = try(var.aws_cloudwatch_metrics.wait_for_jobs, null)
dependency_update = try(var.aws_cloudwatch_metrics.dependency_update, null)
replace = try(var.aws_cloudwatch_metrics.replace, null)
Expand Down Expand Up @@ -431,7 +431,7 @@ module "aws_efs_csi_driver" {
skip_crds = try(var.aws_efs_csi_driver.skip_crds, null)
render_subchart_notes = try(var.aws_efs_csi_driver.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_efs_csi_driver.disable_openapi_validation, null)
wait = try(var.aws_efs_csi_driver.wait, null)
wait = try(var.aws_efs_csi_driver.wait, false)
wait_for_jobs = try(var.aws_efs_csi_driver.wait_for_jobs, null)
dependency_update = try(var.aws_efs_csi_driver.dependency_update, null)
replace = try(var.aws_efs_csi_driver.replace, null)
Expand Down Expand Up @@ -579,7 +579,7 @@ module "aws_for_fluentbit" {
skip_crds = try(var.aws_for_fluentbit.skip_crds, null)
render_subchart_notes = try(var.aws_for_fluentbit.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_for_fluentbit.disable_openapi_validation, null)
wait = try(var.aws_for_fluentbit.wait, null)
wait = try(var.aws_for_fluentbit.wait, false)
wait_for_jobs = try(var.aws_for_fluentbit.wait_for_jobs, null)
dependency_update = try(var.aws_for_fluentbit.dependency_update, null)
replace = try(var.aws_for_fluentbit.replace, null)
Expand Down Expand Up @@ -724,7 +724,7 @@ module "aws_fsx_csi_driver" {
skip_crds = try(var.aws_fsx_csi_driver.skip_crds, null)
render_subchart_notes = try(var.aws_fsx_csi_driver.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_fsx_csi_driver.disable_openapi_validation, null)
wait = try(var.aws_fsx_csi_driver.wait, null)
wait = try(var.aws_fsx_csi_driver.wait, false)
wait_for_jobs = try(var.aws_fsx_csi_driver.wait_for_jobs, null)
dependency_update = try(var.aws_fsx_csi_driver.dependency_update, null)
replace = try(var.aws_fsx_csi_driver.replace, null)
Expand Down Expand Up @@ -1085,7 +1085,7 @@ module "aws_load_balancer_controller" {
skip_crds = try(var.aws_load_balancer_controller.skip_crds, null)
render_subchart_notes = try(var.aws_load_balancer_controller.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_load_balancer_controller.disable_openapi_validation, null)
wait = try(var.aws_load_balancer_controller.wait, null)
wait = try(var.aws_load_balancer_controller.wait, false)
wait_for_jobs = try(var.aws_load_balancer_controller.wait_for_jobs, null)
dependency_update = try(var.aws_load_balancer_controller.dependency_update, null)
replace = try(var.aws_load_balancer_controller.replace, null)
Expand Down Expand Up @@ -1295,7 +1295,7 @@ module "aws_node_termination_handler" {
skip_crds = try(var.aws_node_termination_handler.skip_crds, null)
render_subchart_notes = try(var.aws_node_termination_handler.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_node_termination_handler.disable_openapi_validation, null)
wait = try(var.aws_node_termination_handler.wait, null)
wait = try(var.aws_node_termination_handler.wait, false)
wait_for_jobs = try(var.aws_node_termination_handler.wait_for_jobs, null)
dependency_update = try(var.aws_node_termination_handler.dependency_update, null)
replace = try(var.aws_node_termination_handler.replace, null)
Expand Down Expand Up @@ -1389,7 +1389,7 @@ module "aws_privateca_issuer" {
# https://github.com/cert-manager/aws-privateca-issuer/blob/main/charts/aws-pca-issuer/Chart.yaml
name = try(var.aws_privateca_issuer.name, "aws-privateca-issuer")
description = try(var.aws_privateca_issuer.description, "A Helm chart to install the AWS Private CA Issuer")
namespace = try(var.aws_privateca_issuer.namespace, "kube-system")
namespace = try(var.aws_privateca_issuer.namespace, module.cert_manager.namespace)
create_namespace = try(var.aws_privateca_issuer.create_namespace, false)
chart = "aws-privateca-issuer"
chart_version = try(var.aws_privateca_issuer.chart_version, "v1.2.5")
Expand All @@ -1416,7 +1416,7 @@ module "aws_privateca_issuer" {
skip_crds = try(var.aws_privateca_issuer.skip_crds, null)
render_subchart_notes = try(var.aws_privateca_issuer.render_subchart_notes, null)
disable_openapi_validation = try(var.aws_privateca_issuer.disable_openapi_validation, null)
wait = try(var.aws_privateca_issuer.wait, null)
wait = try(var.aws_privateca_issuer.wait, false)
wait_for_jobs = try(var.aws_privateca_issuer.wait_for_jobs, null)
dependency_update = try(var.aws_privateca_issuer.dependency_update, null)
replace = try(var.aws_privateca_issuer.replace, null)
Expand Down Expand Up @@ -1531,7 +1531,7 @@ module "cert_manager" {
skip_crds = try(var.cert_manager.skip_crds, null)
render_subchart_notes = try(var.cert_manager.render_subchart_notes, null)
disable_openapi_validation = try(var.cert_manager.disable_openapi_validation, null)
wait = try(var.cert_manager.wait, null)
wait = try(var.cert_manager.wait, false)
wait_for_jobs = try(var.cert_manager.wait_for_jobs, null)
dependency_update = try(var.cert_manager.dependency_update, null)
replace = try(var.cert_manager.replace, null)
Expand Down Expand Up @@ -1672,7 +1672,7 @@ module "cluster_autoscaler" {
skip_crds = try(var.cluster_autoscaler.skip_crds, null)
render_subchart_notes = try(var.cluster_autoscaler.render_subchart_notes, null)
disable_openapi_validation = try(var.cluster_autoscaler.disable_openapi_validation, null)
wait = try(var.cluster_autoscaler.wait, null)
wait = try(var.cluster_autoscaler.wait, false)
wait_for_jobs = try(var.cluster_autoscaler.wait_for_jobs, null)
dependency_update = try(var.cluster_autoscaler.dependency_update, null)
replace = try(var.cluster_autoscaler.replace, null)
Expand Down Expand Up @@ -1774,7 +1774,7 @@ module "cluster_proportional_autoscaler" {
skip_crds = try(var.cluster_proportional_autoscaler.skip_crds, null)
render_subchart_notes = try(var.cluster_proportional_autoscaler.render_subchart_notes, null)
disable_openapi_validation = try(var.cluster_proportional_autoscaler.disable_openapi_validation, null)
wait = try(var.cluster_proportional_autoscaler.wait, null)
wait = try(var.cluster_proportional_autoscaler.wait, false)
wait_for_jobs = try(var.cluster_proportional_autoscaler.wait_for_jobs, null)
dependency_update = try(var.cluster_proportional_autoscaler.dependency_update, null)
replace = try(var.cluster_proportional_autoscaler.replace, null)
Expand Down Expand Up @@ -1819,6 +1819,11 @@ resource "aws_eks_addon" "this" {
}

tags = var.tags

depends_on = [
module.cert_manager.name,
module.cert_manager.namespace,
]
}

################################################################################
Expand Down Expand Up @@ -1882,7 +1887,7 @@ module "external_dns" {
skip_crds = try(var.external_dns.skip_crds, null)
render_subchart_notes = try(var.external_dns.render_subchart_notes, null)
disable_openapi_validation = try(var.external_dns.disable_openapi_validation, null)
wait = try(var.external_dns.wait, null)
wait = try(var.external_dns.wait, false)
wait_for_jobs = try(var.external_dns.wait_for_jobs, null)
dependency_update = try(var.external_dns.dependency_update, null)
replace = try(var.external_dns.replace, null)
Expand Down Expand Up @@ -2031,7 +2036,7 @@ module "external_secrets" {
skip_crds = try(var.external_secrets.skip_crds, null)
render_subchart_notes = try(var.external_secrets.render_subchart_notes, null)
disable_openapi_validation = try(var.external_secrets.disable_openapi_validation, null)
wait = try(var.external_secrets.wait, null)
wait = try(var.external_secrets.wait, false)
wait_for_jobs = try(var.external_secrets.wait_for_jobs, null)
dependency_update = try(var.external_secrets.dependency_update, null)
replace = try(var.external_secrets.replace, null)
Expand Down Expand Up @@ -2231,7 +2236,7 @@ module "gatekeeper" {
skip_crds = try(var.gatekeeper.skip_crds, null)
render_subchart_notes = try(var.gatekeeper.render_subchart_notes, null)
disable_openapi_validation = try(var.gatekeeper.disable_openapi_validation, null)
wait = try(var.gatekeeper.wait, null)
wait = try(var.gatekeeper.wait, false)
wait_for_jobs = try(var.gatekeeper.wait_for_jobs, null)
dependency_update = try(var.gatekeeper.dependency_update, null)
replace = try(var.gatekeeper.replace, null)
Expand Down Expand Up @@ -2284,7 +2289,7 @@ module "ingress_nginx" {
skip_crds = try(var.ingress_nginx.skip_crds, null)
render_subchart_notes = try(var.ingress_nginx.render_subchart_notes, null)
disable_openapi_validation = try(var.ingress_nginx.disable_openapi_validation, null)
wait = try(var.ingress_nginx.wait, null)
wait = try(var.ingress_nginx.wait, false)
wait_for_jobs = try(var.ingress_nginx.wait_for_jobs, null)
dependency_update = try(var.ingress_nginx.dependency_update, null)
replace = try(var.ingress_nginx.replace, null)
Expand Down Expand Up @@ -2537,7 +2542,7 @@ module "karpenter" {
skip_crds = try(var.karpenter.skip_crds, null)
render_subchart_notes = try(var.karpenter.render_subchart_notes, null)
disable_openapi_validation = try(var.karpenter.disable_openapi_validation, null)
wait = try(var.karpenter.wait, null)
wait = try(var.karpenter.wait, false)
wait_for_jobs = try(var.karpenter.wait_for_jobs, null)
dependency_update = try(var.karpenter.dependency_update, null)
replace = try(var.karpenter.replace, null)
Expand Down Expand Up @@ -2654,7 +2659,7 @@ module "kube_prometheus_stack" {
skip_crds = try(var.kube_prometheus_stack.skip_crds, null)
render_subchart_notes = try(var.kube_prometheus_stack.render_subchart_notes, null)
disable_openapi_validation = try(var.kube_prometheus_stack.disable_openapi_validation, null)
wait = try(var.kube_prometheus_stack.wait, null)
wait = try(var.kube_prometheus_stack.wait, false)
wait_for_jobs = try(var.kube_prometheus_stack.wait_for_jobs, null)
dependency_update = try(var.kube_prometheus_stack.dependency_update, null)
replace = try(var.kube_prometheus_stack.replace, null)
Expand Down Expand Up @@ -2707,7 +2712,7 @@ module "metrics_server" {
skip_crds = try(var.metrics_server.skip_crds, null)
render_subchart_notes = try(var.metrics_server.render_subchart_notes, null)
disable_openapi_validation = try(var.metrics_server.disable_openapi_validation, null)
wait = try(var.metrics_server.wait, null)
wait = try(var.metrics_server.wait, false)
wait_for_jobs = try(var.metrics_server.wait_for_jobs, null)
dependency_update = try(var.metrics_server.dependency_update, null)
replace = try(var.metrics_server.replace, null)
Expand Down Expand Up @@ -2760,7 +2765,7 @@ module "secrets_store_csi_driver" {
skip_crds = try(var.secrets_store_csi_driver.skip_crds, null)
render_subchart_notes = try(var.secrets_store_csi_driver.render_subchart_notes, null)
disable_openapi_validation = try(var.secrets_store_csi_driver.disable_openapi_validation, null)
wait = try(var.secrets_store_csi_driver.wait, null)
wait = try(var.secrets_store_csi_driver.wait, false)
wait_for_jobs = try(var.secrets_store_csi_driver.wait_for_jobs, null)
dependency_update = try(var.secrets_store_csi_driver.dependency_update, null)
replace = try(var.secrets_store_csi_driver.replace, null)
Expand Down Expand Up @@ -2813,7 +2818,7 @@ module "secrets_store_csi_driver_provider_aws" {
skip_crds = try(var.secrets_store_csi_driver_provider_aws.skip_crds, null)
render_subchart_notes = try(var.secrets_store_csi_driver_provider_aws.render_subchart_notes, null)
disable_openapi_validation = try(var.secrets_store_csi_driver_provider_aws.disable_openapi_validation, null)
wait = try(var.secrets_store_csi_driver_provider_aws.wait, null)
wait = try(var.secrets_store_csi_driver_provider_aws.wait, false)
wait_for_jobs = try(var.secrets_store_csi_driver_provider_aws.wait_for_jobs, null)
dependency_update = try(var.secrets_store_csi_driver_provider_aws.dependency_update, null)
replace = try(var.secrets_store_csi_driver_provider_aws.replace, null)
Expand Down Expand Up @@ -2919,7 +2924,7 @@ module "velero" {
skip_crds = try(var.velero.skip_crds, null)
render_subchart_notes = try(var.velero.render_subchart_notes, null)
disable_openapi_validation = try(var.velero.disable_openapi_validation, null)
wait = try(var.velero.wait, null)
wait = try(var.velero.wait, false)
wait_for_jobs = try(var.velero.wait_for_jobs, null)
dependency_update = try(var.velero.dependency_update, null)
replace = try(var.velero.replace, null)
Expand Down Expand Up @@ -3043,7 +3048,7 @@ module "vpa" {
skip_crds = try(var.vpa.skip_crds, null)
render_subchart_notes = try(var.vpa.render_subchart_notes, null)
disable_openapi_validation = try(var.vpa.disable_openapi_validation, null)
wait = try(var.vpa.wait, null)
wait = try(var.vpa.wait, false)
wait_for_jobs = try(var.vpa.wait_for_jobs, null)
dependency_update = try(var.vpa.dependency_update, null)
replace = try(var.vpa.replace, null)
Expand Down
51 changes: 25 additions & 26 deletions tests/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,6 @@ module "eks" {

manage_aws_auth_configmap = true

cluster_addons = {
aws-ebs-csi-driver = {
most_recent = true
service_account_role_arn = module.ebs_csi_driver_irsa.iam_role_arn
}
coredns = {
most_recent = true

timeouts = {
create = "25m"
delete = "10m"
}
}
vpc-cni = {
most_recent = true
}
kube-proxy = {}
# ADOT has a dependency on cert-manager.
#adot = {
# most_recent = true
# service_account_role_arn = module.adot_irsa.iam_role_arn
#}
aws-guardduty-agent = {}
}

eks_managed_node_groups = {
initial = {
instance_types = ["m5.xlarge"]
Expand Down Expand Up @@ -131,6 +106,30 @@ module "eks_blueprints_addons" {
cluster_version = module.eks.cluster_version
oidc_provider_arn = module.eks.oidc_provider_arn

eks_addons = {
aws-ebs-csi-driver = {
most_recent = true
service_account_role_arn = module.ebs_csi_driver_irsa.iam_role_arn
}
coredns = {
most_recent = true

timeouts = {
create = "25m"
delete = "10m"
}
}
vpc-cni = {
most_recent = true
}
kube-proxy = {}
adot = {
most_recent = true
service_account_role_arn = module.adot_irsa.iam_role_arn
}
aws-guardduty-agent = {}
}

enable_aws_efs_csi_driver = true
enable_aws_fsx_csi_driver = true
enable_argocd = true
Expand Down Expand Up @@ -209,7 +208,7 @@ module "eks_blueprints_addons" {

module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 4.0"
version = "~> 5.0"

name = local.name
cidr = local.vpc_cidr
Expand Down

0 comments on commit f2a3190

Please sign in to comment.