Skip to content

Commit

Permalink
Clean up unused variables and values (#20)
Browse files Browse the repository at this point in the history
* Add module release process (#19)

* add startup taint

* add namespace and startup taint to template

* templatlize

* fix vals

* fewer things

* add a few missing values

* create ns

* update values

* add nodeSelector and tolerations

* remove digest

* node group

* fmt

* syntax and startupTaints

* fix syntax

* update values

* remove ng selector

* lower cpu requests

* use digest again

* simplify repository

* fix repository

* escape the .

* fix subnets_name

* subnet selector

* use the outputs from karpenter module

* create instance profile true

* cleanup

* without cluster tag

* pass in vpc

* enable debug and disable serviceMonitor

* fix merge issues

* update resources and set eksControlPlane true

* try enable_pod_identity

* update updated upstream

* more options for namings

* shorter

* validate role name length

* validate event rules name length

* shorter

* shorter still

* fix prefix

* name the queue

* 66 - 3 = 63, limit 64

* longest event name is InstanceStateChange

* another

* maybe

* name

* name_prefix

* or_not

* add module release process

* update module source

* update release actions

* Comment out unused values

* Comment out vpc_id variable definition

* Disable IRSA

---------

Co-authored-by: Matthew Creal Morgan <matthew.c.morgan@census.gov>
  • Loading branch information
yang0352 and morga471 committed Apr 16, 2025
1 parent 16ca976 commit a3016e4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
1 change: 0 additions & 1 deletion karpenter-resources/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ec2NodeClass:
amiFamily: ${amd_ami_family}
amiSelectorTerms:
- alias: ${amd_ami_alias}
vpcId: ${vpc_id}
subnetSelectorTerms:
- tags:
Name: "${subnets_name}"
Expand Down
19 changes: 13 additions & 6 deletions karpenter/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ controller:
env:
- name: AWS_REGION
value: ${region}
nodeSelector:
kubernetes.io/os: linux
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"

nodeSelector:
kubernetes.io/os: linux

tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule

nodeSelector:
kubernetes.io/os: linux
Expand Down
5 changes: 1 addition & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ module "karpenter_resources" {
create_instance_profile = true
create_node_iam_role = true
create_pod_identity_association = true
enable_irsa = true
enable_irsa = false
enable_pod_identity = true
enable_v1_permissions = true
irsa_namespace_service_accounts = ["${var.namespace}:karpenter"]
irsa_oidc_provider_arn = var.oidc_provider_arn
node_iam_role_name = local.node_iam_role_name
queue_name = local.queue_name
rule_name_prefix = local.rule_name_prefix
Expand Down Expand Up @@ -104,7 +102,6 @@ resource "helm_release" "nodepool_resources" {
karpenter_node_profile = module.karpenter_resources.instance_profile_name
subnets_name = var.subnets_name
tags = var.tags
vpc_id = var.vpc_id
})
]
}
5 changes: 0 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,3 @@ variable "tags" {
type = map(string)
default = {}
}

variable "vpc_id" {
description = "The ID of the VPC where the resources will be deployed"
type = string
}

0 comments on commit a3016e4

Please sign in to comment.