Skip to content

Commit

Permalink
updating Tetrate Istio
Browse files Browse the repository at this point in the history
Signed-off-by: Petr McAllister <[email protected]>
  • Loading branch information
PetrMc committed Oct 20, 2023
1 parent 8a06a6e commit 57e0e84
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
12 changes: 6 additions & 6 deletions modules/kubernetes-addons/tetrate-istio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ No providers.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_base"></a> [base](#module\_base) | ../helm-addon | n/a |
| <a name="module_cni"></a> [cni](#module\_cni) | ../helm-addon | n/a |
| <a name="module_gateway"></a> [gateway](#module\_gateway) | ../helm-addon | n/a |
| <a name="module_istiod"></a> [istiod](#module\_istiod) | ../helm-addon | n/a |
| <a name="module_base"></a> [base](#module\_base) | github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon | v4 |
| <a name="module_cni"></a> [cni](#module\_cni) | github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon | v4 |
| <a name="module_gateway"></a> [gateway](#module\_gateway) | github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon | v4 |
| <a name="module_istiod"></a> [istiod](#module\_istiod) | github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon | v4 |

## Resources

Expand All @@ -40,10 +40,10 @@ No resources.
| <a name="input_base_helm_config"></a> [base\_helm\_config](#input\_base\_helm\_config) | Istio `base` Helm Chart Configuration | `any` | `{}` | no |
| <a name="input_cni_helm_config"></a> [cni\_helm\_config](#input\_cni\_helm\_config) | Istio `cni` Helm Chart Configuration | `any` | `{}` | no |
| <a name="input_distribution"></a> [distribution](#input\_distribution) | Istio distribution | `string` | `"TID"` | no |
| <a name="input_distribution_version"></a> [distribution\_version](#input\_distribution\_version) | Istio version | `string` | `""` | no |
| <a name="input_distribution_version"></a> [distribution\_version](#input\_distribution\_version) | Tetrate Istio Distro | `string` | `""` | no |
| <a name="input_gateway_helm_config"></a> [gateway\_helm\_config](#input\_gateway\_helm\_config) | Istio `gateway` Helm Chart Configuration | `any` | `{}` | no |
| <a name="input_install_base"></a> [install\_base](#input\_install\_base) | Install Istio `base` Helm Chart | `bool` | `true` | no |
| <a name="input_install_cni"></a> [install\_cni](#input\_install\_cni) | Install Istio `cni` Helm Chart | `bool` | `true` | no |
| <a name="input_install_cni"></a> [install\_cni](#input\_install\_cni) | Install Istio `cni` Helm Chart | `bool` | `false` | no |
| <a name="input_install_gateway"></a> [install\_gateway](#input\_install\_gateway) | Install Istio `gateway` Helm Chart | `bool` | `true` | no |
| <a name="input_install_istiod"></a> [install\_istiod](#input\_install\_istiod) | Install Istio `istiod` Helm Chart | `bool` | `true` | no |
| <a name="input_istiod_helm_config"></a> [istiod\_helm\_config](#input\_istiod\_helm\_config) | Istio `istiod` Helm Chart Configuration | `any` | `{}` | no |
Expand Down
5 changes: 4 additions & 1 deletion modules/kubernetes-addons/tetrate-istio/locals.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Copyright (c) Tetrate, Inc 2022 All Rights Reserved.

locals {
default_version = coalesce(var.distribution_version, "1.12.2")
default_version = coalesce(var.distribution_version, "1.18.2")

default_helm_config = {
name = "undefined"
chart = "undefined"
repository = "https://istio-release.storage.googleapis.com/charts"
version = local.default_version
namespace = "istio-system"
timeout = "1200"
create_namespace = true
description = "Istio service mesh"
}
Expand Down
6 changes: 4 additions & 2 deletions modules/kubernetes-addons/tetrate-istio/locals_tid.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Tetrate, Inc 2022 All Rights Reserved.

locals {
tetrate_istio_distribution_helm_config = {
description = "Tetrate Istio Distribution - Simple, safe enterprise-grade Istio distribution"
Expand All @@ -7,13 +9,13 @@ locals {
cni = tolist([yamlencode({
"global" : {
"hub" : "containers.istio.tetratelabs.com",
"tag" : "${lookup(var.cni_helm_config, "version", local.default_helm_config.version)}-tetratefips-v0",
"tag" : "${lookup(var.cni_helm_config, "version", local.default_helm_config.version)}-tetrate-v0",
}
})])
istiod = tolist([yamlencode({
"global" : {
"hub" : "containers.istio.tetratelabs.com",
"tag" : "${lookup(var.istiod_helm_config, "version", local.default_helm_config.version)}-tetratefips-v0",
"tag" : "${lookup(var.istiod_helm_config, "version", local.default_helm_config.version)}-tetrate-v0",
}
})])
}
Expand Down
12 changes: 7 additions & 5 deletions modules/kubernetes-addons/tetrate-istio/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Tetrate, Inc 2022 All Rights Reserved.

module "base" {
source = "../helm-addon"
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon?ref=v4"

count = var.install_base ? 1 : 0

Expand All @@ -9,7 +11,7 @@ module "base" {
}

module "cni" {
source = "../helm-addon"
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon?ref=v4"

count = var.install_cni ? 1 : 0

Expand All @@ -21,19 +23,19 @@ module "cni" {
}

module "istiod" {
source = "../helm-addon"
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon?ref=v4"

count = var.install_istiod ? 1 : 0

manage_via_gitops = var.manage_via_gitops
helm_config = local.istiod_helm_config
addon_context = var.addon_context

depends_on = [module.cni]
depends_on = [module.base]
}

module "gateway" {
source = "../helm-addon"
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon?ref=v4"

count = var.install_gateway ? 1 : 0

Expand Down
2 changes: 2 additions & 0 deletions modules/kubernetes-addons/tetrate-istio/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Tetrate, Inc 2022 All Rights Reserved.

output "argocd_gitops_config" {
description = "Configuration used for managing the add-on with ArgoCD"
value = var.manage_via_gitops ? local.argocd_gitops_config : null
Expand Down
6 changes: 4 additions & 2 deletions modules/kubernetes-addons/tetrate-istio/variables.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Copyright (c) Tetrate, Inc 2022 All Rights Reserved.

variable "distribution" {
description = "Istio distribution"
type = string
default = "TID"
}

variable "distribution_version" {
description = "Istio version"
description = "Tetrate Istio Distro"
type = string
default = ""
}
Expand All @@ -19,7 +21,7 @@ variable "install_base" {
variable "install_cni" {
description = "Install Istio `cni` Helm Chart"
type = bool
default = true
default = false
}

variable "install_istiod" {
Expand Down
2 changes: 2 additions & 0 deletions modules/kubernetes-addons/tetrate-istio/versions.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Tetrate, Inc 2022 All Rights Reserved.

terraform {
required_version = ">= 1.0.0"
}

0 comments on commit 57e0e84

Please sign in to comment.