diff --git a/README.md b/README.md index 4d78d87..214d6d1 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,6 @@ have a istio proxy configured, prevent communication with that pod.) | [helm_release.ingress](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | [helm_release.istiod](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | [kubernetes_namespace.ns](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource | -| [kubernetes_service.apiserver](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/service) | data source | ## Inputs @@ -116,6 +115,7 @@ have a istio proxy configured, prevent communication with that pod.) | [extra\_listener\_ports](#input\_extra\_listener\_ports) | A list of additional ports that the ingress load balancer should listen to, 9094 for kafka as an example. |
list(object({
name = string
port = string
}))
| `[]` | no | | [istio\_chart\_version](#input\_istio\_chart\_version) | The version of istio to install into the cluster. | `string` | `"1.22.3"` | no | | [istio\_version](#input\_istio\_version) | The version of istio to install into the cluster. | `string` | `"1.22.3"` | no | +| [kubernetes\_service\_apiserver](#input\_kubernetes\_service\_apiserver) | Use to exclude internal API service traffic from the service mesh; it should not change but could be necessary to lookup | `string` | `"172.20.0.1"` | no | | [namespace](#input\_namespace) | The namespace to install the istio components. Defaults to 'istio-system' | `string` | `"istio-system"` | no | | [profile](#input\_profile) | AWS\_PROFILE to use to apply the terraform script. | `string` | `""` | no | | [region](#input\_region) | The region in which the cluster is running. | `string` | n/a | yes | @@ -125,6 +125,7 @@ have a istio proxy configured, prevent communication with that pod.) | Name | Description | |------|-------------| +| [istio\_namespace](#output\_istio\_namespace) | The namespace used by istio. | | [module\_name](#output\_module\_name) | The name of this module. | | [module\_version](#output\_module\_version) | The version of this module. | diff --git a/load_balancer_dns.sh b/load_balancer_dns.sh deleted file mode 100755 index 744a801..0000000 --- a/load_balancer_dns.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# Script to get Load Balancer DNS Name based on the tag Name - -LB_NAME=$1 - -lb_arn=$(for i in $(aws elbv2 describe-load-balancers --query 'LoadBalancers[].LoadBalancerArn' --output text); \ -do aws elbv2 describe-tags --resource-arns "$i" --query "TagDescriptions[?Tags[?Key=='Name' &&Value=='$LB_NAME']].ResourceArn" --output text ;done) - -if [ -z "$lb_arn" ]; then - lb_arn="no_arn_exists_for_this_lb_name" -fi - -dns_name=$(aws elbv2 describe-load-balancers --load-balancer-arns $lb_arn --query 'LoadBalancers[].DNSName' --output text) - -jq -n --arg dnsName "$dns_name" '{"dnsName":$dnsName}' \ No newline at end of file diff --git a/main.tf b/main.tf index 5d7f8f9..3655bb0 100644 --- a/main.tf +++ b/main.tf @@ -187,16 +187,3 @@ resource "helm_release" "egress" { timeout = 90 } - -################################################################### -# INGRESS NLB DATA -################################################################### - -# We need to lookup the DNS entry for the istio ingress load balancer -# This value is used to create the CNAME record for cluster app/api addressing in the DNS module -# We use this external data source to avoid issues with running plans -data "external" "load_balancer_dns" { - depends_on = [helm_release.ingress] - - program = ["bash", "${path.module}/load_balancer_dns.sh", format("%v-%v", var.cluster_name, "istio-ingress")] -} \ No newline at end of file diff --git a/outputs.tf b/outputs.tf index ef947c9..4b17f45 100644 --- a/outputs.tf +++ b/outputs.tf @@ -12,7 +12,7 @@ output "module_version" { value = local.module_version } -output "istio_ingress_lb" { - description = "The Istio ingress network load balancer." - value = data.external.load_balancer_dns.result.dnsName -} \ No newline at end of file +output "istio_namespace" { + description = "The namespace used by istio." + value = kubernetes_namespace.ns.metadata[0].name +} diff --git a/variables.tf b/variables.tf index 79cf6d2..bd11eb6 100644 --- a/variables.tf +++ b/variables.tf @@ -67,4 +67,4 @@ variable "kubernetes_service_apiserver" { description = "Use to exclude internal API service traffic from the service mesh; it should not change but could be necessary to lookup" type = string default = "172.20.0.1" -} \ No newline at end of file +}