From 875792e0034543b5ae4261bb756db94d73e48203 Mon Sep 17 00:00:00 2001 From: Justin Barksdale Date: Mon, 21 Oct 2024 17:09:06 -0400 Subject: [PATCH] Added schema validation and notes to README --- packs/karpenter-1.0.5/README.md | 9 ++++++++- packs/karpenter-1.0.5/schema.yaml | 2 ++ packs/karpenter-1.0.5/values.yaml | 7 +++++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 packs/karpenter-1.0.5/schema.yaml diff --git a/packs/karpenter-1.0.5/README.md b/packs/karpenter-1.0.5/README.md index b326268..86fed7d 100644 --- a/packs/karpenter-1.0.5/README.md +++ b/packs/karpenter-1.0.5/README.md @@ -1,6 +1,6 @@ # Karpenter -Karpenter is an open-source node lifecycle management project built for Kubernetes. Adding Karpenter to a Kubernetes cluster can dramatically improve the efficiency and cost of running workloads on that cluster. Karpenter works by: +Karpenter is an open-source node lifecycle management project built for Kubernetes. Adding Karpenter to a Kubernetes cluster can dramatically improve the efficiency and cost of active workloads in the cluster. Karpenter automatically launches the right compute resources to handle your cluster's applications. Karpenter works by: * Watching for pods that the Kubernetes scheduler has marked as unschedulable * Evaluating scheduling constraints (resource requests, nodeselectors, affinities, tolerations, and topology spread constraints) requested by the pods @@ -12,6 +12,11 @@ Karpenter is an open-source node lifecycle management project built for Kubernet * Minimum Kubernetes Version is 1.25 * Pack support is for EKS only today. * IRSA Roles must be created and used. Review the following section for additional guidance. +* AWS Account Number - This is a required value in the pack for annotations of the service account + +### Pack Values + +Provide your AWS Account Number in the `awsAccountNumber` value of the pack. ### AWS IAM Roles for Service Accounts (IRSA) @@ -54,6 +59,8 @@ Karpenter uses tags in AWS to discover the resources needed to autoscale. Palet ## Usage +Make sure to checkout the [Karpenter Best Practices](https://aws.github.io/aws-eks-best-practices/karpenter/) when using Karpenter. + ### Node Pool ```yaml diff --git a/packs/karpenter-1.0.5/schema.yaml b/packs/karpenter-1.0.5/schema.yaml new file mode 100644 index 0000000..862a580 --- /dev/null +++ b/packs/karpenter-1.0.5/schema.yaml @@ -0,0 +1,2 @@ +awsAccountNumber: + schema: '{{ required }}' \ No newline at end of file diff --git a/packs/karpenter-1.0.5/values.yaml b/packs/karpenter-1.0.5/values.yaml index 0cccd25..7d637af 100644 --- a/packs/karpenter-1.0.5/values.yaml +++ b/packs/karpenter-1.0.5/values.yaml @@ -4,6 +4,9 @@ pack: - image: public.ecr.aws/karpenter/controller:1.0.5 namespace: karpenter +# Provide your AWS account number below for karpenter annotations. +awsAccountNumber: "" + charts: karpenter: # -- Overrides the chart's name. @@ -27,8 +30,8 @@ charts: # If not set and create is true, a name is generated using the fullname template. name: "" # -- Additional annotations for the ServiceAccount. - annotations: {} - # "eks.amazonaws.com/role-arn": "arn:aws:iam:::role/{{.spectro.system.cluster.name}}-karpenterControllerRole" + annotations: + "eks.amazonaws.com/role-arn": "arn:aws:iam::{{.spectro.pack.karpenter.awsAccountNumber}}:role/{{.spectro.system.cluster.name}}-karpenterControllerRole" # -- Specifies additional rules for the core ClusterRole. additionalClusterRoleRules: [] serviceMonitor: