Skip to content

Commit 093574f

Browse files
Fix for namespace creation and timer for Terratest (#465)
* helm create_namespace should always be false when irsa is enabled * make false if create_namespace is not defined * precommit format update * 2 mins sleep added to aid tf destroy the cluster and vpc * terraform-docs: automated action Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent f22c583 commit 093574f

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

examples/gitops/argocd/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
|------|-------------|------|---------|:--------:|
4040
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes Version | `string` | `"1.21"` | no |
4141
| <a name="input_environment"></a> [environment](#input\_environment) | Environment area, e.g. prod or preprod | `string` | `"preprod"` | no |
42+
| <a name="input_region"></a> [region](#input\_region) | Region in which to deploy the cluster | `string` | `"us-west-2"` | no |
4243
| <a name="input_tenant"></a> [tenant](#input\_tenant) | Account Name or unique account unique id e.g., apps or management or aws007 | `string` | `"aws001"` | no |
43-
| <a name="input_zone"></a> [zone](#input\_zone) | zone, e.g. dev or qa or load or ops etc... | `string` | `"dev"` | no |
44+
| <a name="input_zone"></a> [zone](#input\_zone) | Zone, e.g. dev or qa or load or ops etc... | `string` | `"dev"` | no |
4445

4546
## Outputs
4647

examples/gitops/argocd/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ variable "region" {
2626
type = string
2727
description = "Region in which to deploy the cluster"
2828
default = "us-west-2"
29-
}
29+
}

modules/kubernetes-addons/helm-addon/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resource "helm_release" "addon" {
66
version = var.helm_config["version"]
77
timeout = try(var.helm_config["timeout"], 300)
88
values = try(var.helm_config["values"], null)
9-
create_namespace = try(var.helm_config["create_namespace"], false)
9+
create_namespace = var.irsa_config != null ? false : try(var.helm_config["create_namespace"], false)
1010
namespace = var.helm_config["namespace"]
1111
lint = try(var.helm_config["lint"], false)
1212
description = try(var.helm_config["description"], "")

test/src/eks_blueprints_e2e_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1515
"strings"
1616
"testing"
17+
"time"
1718
)
1819

1920
var (
@@ -148,6 +149,7 @@ func TestEksBlueprintsE2E(t *testing.T) {
148149
}
149150
terraformOptions := getTerraformOptions(t, destroyTFOptions)
150151
terraform.Destroy(t, terraformOptions)
152+
time.Sleep(2 * time.Minute) // Workaround for cleaning up dangling ENIs
151153
} else {
152154
terraformOptions := getTerraformOptions(t, inputTfOptions)
153155
terraform.Destroy(t, terraformOptions)

0 commit comments

Comments
 (0)