Skip to content

Commit

Permalink
fix: Use namespace resource to share across istio charts to avoid c…
Browse files Browse the repository at this point in the history
…onflicts (#1768)
  • Loading branch information
bryantbiggs committed Sep 19, 2023
1 parent 982d340 commit e281f77
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
6 changes: 6 additions & 0 deletions patterns/istio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ concepts.

See [here](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started/#prerequisites) for the prerequisites and steps to deploy this pattern.

Once the resources have been provisioned, you will need to replace the `istio-ingress` pods due to a [`istiod` dependency issue](https://github.com/istio/istio/issues/35789). Use the following command to perform a rolling restart of the `istio-ingress` pods:

```sh
kubectl rollout restart deployment istio-ingress -n istio-ingress
```

### Observability Add-ons

Use the following code snippet to add the Istio Observability Add-ons on the EKS
Expand Down
44 changes: 25 additions & 19 deletions patterns/istio/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ module "eks" {
cluster_version = "1.27"
cluster_endpoint_public_access = true

cluster_addons = {
coredns = {}
kube-proxy = {}
vpc-cni = {
preserve = true
}
}

vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand All @@ -67,7 +75,7 @@ module "eks" {

min_size = 1
max_size = 5
desired_size = 3 # When < 3, the coredns add-on ends up in a degraded state
desired_size = 2
}
}

Expand Down Expand Up @@ -99,6 +107,12 @@ module "eks" {
# EKS Blueprints Addons
################################################################################

resource "kubernetes_namespace_v1" "istio_system" {
metadata {
name = "istio-system"
}
}

module "eks_blueprints_addons" {
source = "aws-ia/eks-blueprints-addons/aws"
version = "~> 1.0"
Expand All @@ -108,32 +122,24 @@ module "eks_blueprints_addons" {
cluster_version = module.eks.cluster_version
oidc_provider_arn = module.eks.oidc_provider_arn

eks_addons = {
coredns = {}
vpc-cni = {}
kube-proxy = {}
}

# This is required to expose Istio Ingress Gateway
enable_aws_load_balancer_controller = true

helm_releases = {
istio-base = {
chart = "base"
version = local.istio_chart_version
repository = local.istio_chart_url
name = "istio-base"
namespace = "istio-system"
create_namespace = true
chart = "base"
version = local.istio_chart_version
repository = local.istio_chart_url
name = "istio-base"
namespace = kubernetes_namespace_v1.istio_system.metadata[0].name
}

istiod = {
chart = "istiod"
version = local.istio_chart_version
repository = local.istio_chart_url
name = "istiod"
namespace = "istio-system"
create_namespace = false
chart = "istiod"
version = local.istio_chart_version
repository = local.istio_chart_url
name = "istiod"
namespace = kubernetes_namespace_v1.istio_system.metadata[0].name

set = [
{
Expand Down

0 comments on commit e281f77

Please sign in to comment.