Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workload platform #207

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aws/platform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module "aws_load_balancer_controller" {
k8s_namespace = var.k8s_namespace
oidc_issuer = data.aws_ssm_parameter.oidc_issuer.value
vpc_cidr_block = module.network.vpc.cidr_block
vpc_id = module.network.vpc.id

depends_on = [module.common_platform]
}
Expand Down
2 changes: 2 additions & 0 deletions aws/platform/modules/load-balancer-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ target group bound to the Istio ingress gateway service.
| [helm_release.ingress_config](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.this](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [aws_lb_target_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lb_target_group) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

Expand All @@ -53,4 +54,5 @@ target group bound to the Istio ingress gateway service.
| <a name="input_oidc_issuer"></a> [oidc\_issuer](#input\_oidc\_issuer) | OIDC issuer of the Kubernetes cluster | `string` | n/a | yes |
| <a name="input_target_group_name"></a> [target\_group\_name](#input\_target\_group\_name) | Override the name of the target group for this cluster | `string` | `null` | no |
| <a name="input_vpc_cidr_block"></a> [vpc\_cidr\_block](#input\_vpc\_cidr\_block) | CIDR block for the AWS VPC in which the load balancer runs | `string` | n/a | yes |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC ID for the Kubernetes cluster. | `string` | n/a | yes |
<!-- END_TF_DOCS -->
4 changes: 4 additions & 0 deletions aws/platform/modules/load-balancer-controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ resource "aws_iam_role_policy_attachment" "this" {
policy_arn = aws_iam_policy.this.arn
}

data "aws_region" "current" {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this return anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it returns the name of the region terraform's running in.
here's how it's used
region = data.aws_region.current.name


locals {
chart_defaults = jsondecode(file("${path.module}/chart.json"))

Expand All @@ -90,6 +92,8 @@ locals {
"eks.amazonaws.com/role-arn" = module.service_account_role.arn
}
}
region = data.aws_region.current.name
vpcId = var.vpc_id
})
]
}
5 changes: 5 additions & 0 deletions aws/platform/modules/load-balancer-controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ variable "vpc_cidr_block" {
type = string
description = "CIDR block for the AWS VPC in which the load balancer runs"
}

variable "vpc_id" {
type = string
description = "The VPC ID for the Kubernetes cluster."
}
8 changes: 4 additions & 4 deletions charts.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"cert-manager": {
"chart": "cert-manager",
"repository": "https://charts.jetstack.io",
"version": "v1.10.1"
"version": "v1.12.13"
},
"cluster-autoscaler": {
"chart": "cluster-autoscaler",
Expand All @@ -27,17 +27,17 @@
"istio-base": {
"chart": "base",
"repository": "https://istio-release.storage.googleapis.com/charts",
"version": "1.16.1"
"version": "1.23.0"
},
"istiod": {
"chart": "istiod",
"repository": "https://istio-release.storage.googleapis.com/charts",
"version": "1.16.1"
"version": "1.23.0"
},
"istio-ingress": {
"chart": "gateway",
"repository": "https://istio-release.storage.googleapis.com/charts",
"version": "1.16.1"
"version": "1.23.0"
},
"load-balancer-controller": {
"chart": "aws-load-balancer-controller",
Expand Down
2 changes: 1 addition & 1 deletion platform/modules/cert-manager/chart.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chart": "cert-manager",
"repository": "https://charts.jetstack.io",
"version": "v1.10.1"
"version": "v1.12.13"
}
2 changes: 1 addition & 1 deletion platform/modules/istio-base/chart.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chart": "base",
"repository": "https://istio-release.storage.googleapis.com/charts",
"version": "1.16.1"
"version": "1.23.0"
}
2 changes: 1 addition & 1 deletion platform/modules/istio-ingress/chart.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chart": "gateway",
"repository": "https://istio-release.storage.googleapis.com/charts",
"version": "1.16.1"
"version": "1.23.0"
}
2 changes: 1 addition & 1 deletion platform/modules/istiod/chart.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chart": "istiod",
"repository": "https://istio-release.storage.googleapis.com/charts",
"version": "1.16.1"
"version": "1.23.0"
}