Skip to content

Commit

Permalink
Merge pull request #7 from SCT-Engineering/b101
Browse files Browse the repository at this point in the history
✨ feat(versions): bump versions to pull from upstream
  • Loading branch information
mcgin314 committed Sep 20, 2024
2 parents 24fe465 + cb1545d commit b042d8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,21 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
| Name | Source | Version |
|------|--------|---------|
| <a name="module_images"></a> [images](#module\_images) | git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade |
| <a name="module_karpenter_resources"></a> [karpenter\_resources](#module\_karpenter\_resources) | git@github.e.it.census.gov:SCT-Engineering/terraform-aws-eks.git//modules/karpenter | v20.24.0 |
| <a name="module_karpenter_resources"></a> [karpenter\_resources](#module\_karpenter\_resources) | git@github.e.it.census.gov:SCT-Engineering/terraform-aws-eks.git//modules/karpenter | v20.24.1 |

## Resources

| Name | Type |
|------|------|
| [aws_ec2_tag.container_subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ec2_tag) | resource |
| [aws_iam_instance_profile.karpenter_node_instance_profile](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
| [aws_iam_service_linked_role.ec2_spot](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_service_linked_role) | resource |
| [helm_release.karpenter](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [kubectl_manifest.karpenter_ec2_node_class](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.karpenter_node_pool](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [aws_arn.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_ecr_image.karpenter_image](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_image) | data source |
| [aws_ecr_image.kubectl_image](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_image) | data source |
| [aws_iam_roles.roles](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_roles) | data source |
| [aws_subnets.container_subnets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |

## Inputs
Expand All @@ -60,10 +58,10 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
|------|-------------|------|---------|:--------:|
| <a name="input_cluster_endpoint"></a> [cluster\_endpoint](#input\_cluster\_endpoint) | Endpoint for your Kubernetes API server | `string` | n/a | yes |
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes |
| <a name="input_karpenter_helm_chart"></a> [karpenter\_helm\_chart](#input\_karpenter\_helm\_chart) | Which helm chart of karpenter | `string` | `"1.0.1"` | no |
| <a name="input_karpenter_helm_chart"></a> [karpenter\_helm\_chart](#input\_karpenter\_helm\_chart) | Which helm chart of karpenter | `string` | `"1.0.2"` | no |
| <a name="input_karpenter_helm_repo"></a> [karpenter\_helm\_repo](#input\_karpenter\_helm\_repo) | Helm repo for official karpenter chart | `string` | `"oci://public.ecr.aws/karpenter"` | no |
| <a name="input_karpenter_node_group_name"></a> [karpenter\_node\_group\_name](#input\_karpenter\_node\_group\_name) | The cluster node group that will host karpenter, should not be a karpenter managed node group | `string` | n/a | yes |
| <a name="input_karpenter_tag"></a> [karpenter\_tag](#input\_karpenter\_tag) | Which tag of karpenter image | `string` | `"1.0.1"` | no |
| <a name="input_karpenter_tag"></a> [karpenter\_tag](#input\_karpenter\_tag) | Which tag of karpenter image | `string` | `"1.0.2"` | no |
| <a name="input_kubectl_tag"></a> [kubectl\_tag](#input\_kubectl\_tag) | Which tag of kubectl image | `string` | `"1.30.4"` | no |
| <a name="input_oidc_provider_arn"></a> [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | The ARN of the OIDC Provider if `enable_irsa = true` | `string` | n/a | yes |
| <a name="input_profile"></a> [profile](#input\_profile) | AWS config profile | `string` | `""` | no |
Expand Down
13 changes: 1 addition & 12 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data "aws_subnets" "container_subnets" {
# Replicating from here: https://github.e.it.census.gov/SCT-Engineering/terraform-aws-eks/tree/master/modules/karpenter
# Karpenter IRSA roles and policies
module "karpenter_resources" {
source = "git@github.e.it.census.gov:SCT-Engineering/terraform-aws-eks.git//modules/karpenter?ref=v20.24.0"
source = "git@github.e.it.census.gov:SCT-Engineering/terraform-aws-eks.git//modules/karpenter?ref=v20.24.1"

cluster_name = var.cluster_name
enable_irsa = true
Expand Down Expand Up @@ -181,17 +181,6 @@ resource "aws_iam_instance_profile" "karpenter_node_instance_profile" {
role = module.karpenter_resources.node_iam_role_name
}

# Query to see if service-linked role exists
data "aws_iam_roles" "roles" {
path_prefix = "/aws-reserved/spot.amazonaws.com"
}

# Permission for spot
resource "aws_iam_service_linked_role" "ec2_spot" {
count = data.aws_iam_roles.roles == null ? 1 : 0
aws_service_name = "spot.amazonaws.com"
}

# Get the default tags from the provider
data "aws_default_tags" "default_tags" {}

Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ variable "karpenter_helm_repo" {
variable "karpenter_helm_chart" {
description = "Which helm chart of karpenter"
type = string
default = "1.0.1"
default = "1.0.2"
}

variable "karpenter_tag" {
description = "Which tag of karpenter image"
type = string
default = "1.0.1"
default = "1.0.2"
}

variable "kubectl_tag" {
Expand Down

0 comments on commit b042d8a

Please sign in to comment.