Skip to content

Commit

Permalink
feat(DMVP-5592): have karpenter integration and upgrade all underlyin…
Browse files Browse the repository at this point in the history
…g modules/helms
  • Loading branch information
mrdntgrn committed Dec 2, 2024
1 parent e1dc8a3 commit 3e5568e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/karpenter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# terraform module allows to create/deploy karpenter operator to have custom/configurable node auto-scaling ability
## for more info check https://karpenter.sh and https://artifacthub.io/packages/helm/karpenter/karpenter

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

# terraform module allows to create/deploy karpenter operator to have custom/configurable node auto-scaling ability
## for more info check https://karpenter.sh and https://artifacthub.io/packages/helm/karpenter/karpenter

## example
```terraform
Expand Down Expand Up @@ -34,7 +36,9 @@ module "karpenter" {
}
}
```
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

**/

## Requirements

| Name | Version |
Expand Down
43 changes: 43 additions & 0 deletions modules/karpenter/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
/**
*
* # terraform module allows to create/deploy karpenter operator to have custom/configurable node auto-scaling ability
* ## for more info check https://karpenter.sh and https://artifacthub.io/packages/helm/karpenter/karpenter
*
*
* ## example
* ```terraform
* module "karpenter" {
* source = "dasmeta/eks/aws//modules/karpenter"
* version = "2.19.0"
*
* cluster_name = "test-cluster-with-karpenter"
* cluster_endpoint = "<endpoint-to-eks-cluster>"
* oidc_provider_arn = "<eks-oidc-provider-arn>"
* subnet_ids = ["<subnet-1>", "<subnet-2>", "<subnet-3>"]
*
* resource_configs = {
* nodePools = {
* general = { weight = 1 } # by default it use linux amd64 cpu<6, memory<10000Mi, >2 generation and ["spot", "on-demand"] type nodes so that it tries to get spot at first and if no then on-demand
* on-demand = {
* # weight = 0 # by default the weight is 0 and this is lowest priority, we can schedule pod in this not
* template = {
* spec = {
* requirements = [
* {
* key = "karpenter.sh/capacity-type"
* operator = "In"
* values = ["on-demand"]
* }
* ]
* }
* }
* }
* }
* }
* }
* ```
*
*
**/


# creates aws eks karpenter needed policy/role/queue/event-subscriber resources to use in karpenter helm
module "this" {
source = "terraform-aws-modules/eks/aws//modules/karpenter"
Expand Down

0 comments on commit 3e5568e

Please sign in to comment.