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
  • Loading branch information
bryantbiggs committed Sep 19, 2023
1 parent 982d340 commit f76b7f1
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,12 +58,20 @@ 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

eks_managed_node_groups = {
initial = {
instance_types = ["m5.large"]
instance_types = ["m5.xlarge"]

min_size = 1
max_size = 5
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 f76b7f1

Please sign in to comment.