From 4ebaa05376805201cc66bcae1c00f4002d48fbda Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:26:45 +0300 Subject: [PATCH 1/9] remove other requirements when instancetypes is configured --- charts/karpenter_nodes/Chart.yaml | 2 +- .../karpenter_nodes/templates/nodepool.yaml | 4 +- .../nodepool_nodes_explicittypes_test.yaml | 55 +++++++++++++++++++ .../tests/nodepool_nodes_noclass_test.yaml | 4 +- .../tests/nodepool_nodes_workers_test.yaml | 8 +-- charts/karpenter_nodes/tests/values.yaml | 8 +++ 6 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml diff --git a/charts/karpenter_nodes/Chart.yaml b/charts/karpenter_nodes/Chart.yaml index 55f5945..506646a 100644 --- a/charts/karpenter_nodes/Chart.yaml +++ b/charts/karpenter_nodes/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: karpenter_nodes -version: 1.0.0 +version: 1.0.1 description: A Helm chart for generating NodeClasses and NodePools for Karpenter maintainers: - name: nadavbuc diff --git a/charts/karpenter_nodes/templates/nodepool.yaml b/charts/karpenter_nodes/templates/nodepool.yaml index 19916fa..5dda834 100644 --- a/charts/karpenter_nodes/templates/nodepool.yaml +++ b/charts/karpenter_nodes/templates/nodepool.yaml @@ -52,6 +52,7 @@ spec: {{- end }} {{- end }} requirements: + {{- if not (hasKey $v.instances "instanceTypes") }} - key: "karpenter.k8s.aws/instance-category" operator: In values: @@ -68,12 +69,13 @@ spec: operator: Gt values: - {{ sub ($v.instances.minGeneration | default $.Values.instances.minGeneration) 1 | quote }} + {{- end }} - key: "topology.kubernetes.io/zone" operator: In values: {{- range $v.availabilityZones | default $.Values.availabilityZones }} - {{ . }} - {{- end }} + {{- end }} - key: "kubernetes.io/arch" operator: In values: diff --git a/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml b/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml new file mode 100644 index 0000000..65db288 --- /dev/null +++ b/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml @@ -0,0 +1,55 @@ +suite: test nodepool - nodes-explicittypes +templates: + - nodepool.yaml +values: + - values.yaml + +tests: + - it: Verify nodes-explicittypes metadata + documentIndex: 1 + asserts: + - isKind: + of: NodePool + - equal: + path: metadata.name + value: nodes-explicittypes-amd64 + - equal: + path: spec.template.metadata.labels.cluster + value: eks-dev + - equal: + path: spec.template.metadata.labels.nodegroup + value: nodes-explicittypes + - equal: + path: spec.template.spec.nodeClassRef.name + value: default + + - it: Verify nodes-explicittypes requirements + documentIndex: 1 + asserts: + - equal: + path: spec.template.spec.requirements[0].key + value: "topology.kubernetes.io/zone" + - equal: + path: spec.template.spec.requirements[1].key + value: "kubernetes.io/arch" + - equal: + path: spec.template.spec.requirements[2].key + value: "karpenter.sh/capacity-type" + - equal: + path: spec.template.spec.requirements[3].key + value: "kubernetes.io/os" + - equal: + path: spec.template.spec.requirements[4].key + value: "karpenter.k8s.aws/instance-size" + - equal: + path: spec.template.spec.requirements[5].key + value: "node.kubernetes.io/instance-type" + - equal: + path: spec.template.spec.requirements[5].values[0] + value: t3a.large + - equal: + path: spec.template.spec.requirements[5].values[1] + value: t3a.xlarge + - isNull: + path: spec.template.spec.requirements[6] + \ No newline at end of file diff --git a/charts/karpenter_nodes/tests/nodepool_nodes_noclass_test.yaml b/charts/karpenter_nodes/tests/nodepool_nodes_noclass_test.yaml index b432124..a088dae 100644 --- a/charts/karpenter_nodes/tests/nodepool_nodes_noclass_test.yaml +++ b/charts/karpenter_nodes/tests/nodepool_nodes_noclass_test.yaml @@ -6,7 +6,7 @@ values: tests: - it: Verify nodes-noclass metadata - documentIndex: 1 + documentIndex: 2 asserts: - isKind: of: NodePool @@ -24,7 +24,7 @@ tests: value: default - it: Verify nodes-noclass requirements - documentIndex: 1 + documentIndex: 2 asserts: - equal: path: spec.template.spec.requirements[0].key diff --git a/charts/karpenter_nodes/tests/nodepool_nodes_workers_test.yaml b/charts/karpenter_nodes/tests/nodepool_nodes_workers_test.yaml index b75f104..91d0a11 100644 --- a/charts/karpenter_nodes/tests/nodepool_nodes_workers_test.yaml +++ b/charts/karpenter_nodes/tests/nodepool_nodes_workers_test.yaml @@ -6,7 +6,7 @@ values: tests: - it: Verify nodes-workers metadata - documentIndex: 2 + documentIndex: 3 asserts: - isKind: of: NodePool @@ -60,7 +60,7 @@ tests: - it: Verify nodes-workers requirements - documentIndex: 2 + documentIndex: 3 asserts: - equal: path: spec.template.spec.requirements[0].key @@ -162,7 +162,7 @@ tests: - it: Verify nodes-workers kubelet - documentIndex: 2 + documentIndex: 3 asserts: - equal: path: spec.template.spec.kubelet.systemReserved.cpu @@ -178,7 +178,7 @@ tests: value: "2.2.2.2" - it: Verify nodes-workers Options - documentIndex: 2 + documentIndex: 3 asserts: - equal: path: spec.disruption.expireAfter diff --git a/charts/karpenter_nodes/tests/values.yaml b/charts/karpenter_nodes/tests/values.yaml index 71820b1..7925f14 100644 --- a/charts/karpenter_nodes/tests/values.yaml +++ b/charts/karpenter_nodes/tests/values.yaml @@ -130,6 +130,14 @@ nodeGroups: value: taint2 autoTaint: "true" + nodes-explicittypes: + instances: + instanceTypes: + - t3a.large + - t3a.xlarge + nodeClassRef: + name: default + #Default cluster Settings clusterName: "eks-dev" subnetSelectorTerms: From 78ec36da6bc91f54d7a5ad19328bf044196442aa Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:31:11 +0300 Subject: [PATCH 2/9] fix output and example --- .../examples/output/output.yaml | 1363 ++++++++--------- charts/karpenter_nodes/tests/values.yaml | 168 +- 2 files changed, 756 insertions(+), 775 deletions(-) diff --git a/charts/karpenter_nodes/examples/output/output.yaml b/charts/karpenter_nodes/examples/output/output.yaml index acfb3e7..31a8b77 100644 --- a/charts/karpenter_nodes/examples/output/output.yaml +++ b/charts/karpenter_nodes/examples/output/output.yaml @@ -1,4 +1,3 @@ ---- # Source: karpenter_nodes/templates/priorityclass.yaml apiVersion: scheduling.k8s.io/v1 kind: PriorityClass @@ -18,17 +17,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-canary @@ -37,14 +36,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -124,17 +123,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-default @@ -143,14 +142,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -230,17 +229,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-gpu @@ -249,14 +248,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -336,17 +335,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-ingress @@ -355,14 +354,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -435,17 +434,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-jobs @@ -454,14 +453,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 9000 - throughput: 125 - volumeSize: 500Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 9000 + throughput: 125 + volumeSize: 500Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -541,17 +540,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-monitoring @@ -561,14 +560,14 @@ spec: innercomponent: monitoring managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -648,17 +647,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-workers @@ -667,14 +666,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -759,78 +758,78 @@ spec: nodeClassRef: name: nodes-canary-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_canary - - key: dedicated - value: canary - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_canary + - key: dedicated + value: canary + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m @@ -878,70 +877,70 @@ spec: nodeClassRef: name: nodes-default-amd64 requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m @@ -989,66 +988,66 @@ spec: nodeClassRef: name: nodes-default-amd64 requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "4" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "6" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "4" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "6" kubelet: systemReserved: cpu: 250m @@ -1097,74 +1096,56 @@ spec: nodeClassRef: name: nodes-gpu-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_gpu - - key: dedicated - value: gpu - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_gpu + - key: dedicated + value: gpu + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - g - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: node.kubernetes.io/instance-type - operator: In - values: - - g5.xlarge - - g5.2xlarge - - g5.4xlarge + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: node.kubernetes.io/instance-type + operator: In + values: + - g5.xlarge + - g5.2xlarge + - g5.4xlarge kubelet: systemReserved: cpu: 250m @@ -1214,65 +1195,65 @@ spec: nodeClassRef: name: nodes-ingress-multiarch taints: - - key: dedicated - effect: NoSchedule - value: nodes_ingress - - key: dedicated - value: ingress - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_ingress + - key: dedicated + value: ingress + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "8" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "6" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - arm64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "8" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "6" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - arm64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal kubelet: systemReserved: cpu: 250m @@ -1320,65 +1301,65 @@ spec: nodeClassRef: name: nodes-jobs-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_jobs - - key: dedicated - value: jobs - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_jobs + - key: dedicated + value: jobs + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "8" - - "16" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "8" + - "16" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal kubelet: systemReserved: cpu: 250m @@ -1428,60 +1409,60 @@ spec: nodeClassRef: name: nodes-monitoring-multiarch taints: - - key: dedicated - effect: NoSchedule - value: nodes_monitoring - - key: dedicated - value: monitoring - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_monitoring + - key: dedicated + value: monitoring + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - arm64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - x1 - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - arm64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - x1 + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal kubelet: systemReserved: cpu: 250m @@ -1529,74 +1510,74 @@ spec: nodeClassRef: name: nodes-workers-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_workers + - key: dedicated + effect: NoSchedule + value: nodes_workers requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m @@ -1644,73 +1625,73 @@ spec: nodeClassRef: name: nodes-workers-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_workers + - key: dedicated + effect: NoSchedule + value: nodes_workers requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m diff --git a/charts/karpenter_nodes/tests/values.yaml b/charts/karpenter_nodes/tests/values.yaml index 7925f14..21148e0 100644 --- a/charts/karpenter_nodes/tests/values.yaml +++ b/charts/karpenter_nodes/tests/values.yaml @@ -4,22 +4,22 @@ nodeGroups: instances: minGeneration: 7 budget: - - nodes: "2" + - nodes: "2" headRoom: - - size: small - count: 2 + - size: small + count: 2 labels: testlabel1: label1 testlabel2: label2 taints: - - key: testtaint1 - effect: NoSchedule - value: taint1 - - key: testtaint2 - effect: NoSchedule - value: taint2 + - key: testtaint1 + effect: NoSchedule + value: taint1 + - key: testtaint2 + effect: NoSchedule + value: taint2 excludeFamilies: - - c6a + - c6a nodes-noclass: instances: {} @@ -38,49 +38,49 @@ nodeGroups: consolidationPolicy: "WhenEmpty" consolidateAfter: "10m" blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - volumeSize: 150Gi - volumeType: gp3 - encrypted: false - deleteOnTermination: true - iops: 3000 - throughput: 125 + - deviceName: /dev/xvda + ebs: + volumeSize: 150Gi + volumeType: gp3 + encrypted: false + deleteOnTermination: true + iops: 3000 + throughput: 125 IamInstanceProfile: "arn:aws:blablablabla" detailedMonitoring: true associatePublicIPAddress: true excludeFamilies: - - m6a + - m6a headRoom: - - size: xlarge - count: 4 - antiAffinitySpec: - - key: testlabel2 - operator: In - values: - - value1 - - value2 - nameSpaces: - - default - - kube-system - additionalRequirements: - - key: "karpenter.k8s.aws/instance-local-nvme" - operator: "Exists" - - key: "karpenter.k8s.aws/other" - operator: "In" + - size: xlarge + count: 4 + antiAffinitySpec: + - key: testlabel2 + operator: In values: - - "value1" - - "value2" + - value1 + - value2 + nameSpaces: + - default + - kube-system + additionalRequirements: + - key: "karpenter.k8s.aws/instance-local-nvme" + operator: "Exists" + - key: "karpenter.k8s.aws/other" + operator: "In" + values: + - "value1" + - "value2" budgets: - - nodes: "5" - - nodes: "0" - schedule: "@daily" - duration: 10m + - nodes: "5" + - nodes: "0" + schedule: "@daily" + duration: 10m amiSelectorTerms: - - tags: - environment: test - - name: my-ami - - id: ami-123 + - tags: + environment: test + - name: my-ami + - id: ami-123 instances: architecture: "arm64" minGeneration: 5 @@ -93,26 +93,26 @@ nodeGroups: capacityType: - on-demand subnetSelectorTerms: - - tags: - Name: "eks-subnet-workers-1" - - tags: - Name: "eks-subnet-workers-2" - - tags: - Name: "eks-subnet-workers-3" + - tags: + Name: "eks-subnet-workers-1" + - tags: + Name: "eks-subnet-workers-2" + - tags: + Name: "eks-subnet-workers-3" securityGroupSelectorTerms: - - tags: - Name: "my-security-group-workers-1" - - tags: - Name: "my-security-group-workers-2" - - tags: - Name: "my-security-group-workers-3" + - tags: + Name: "my-security-group-workers-1" + - tags: + Name: "my-security-group-workers-2" + - tags: + Name: "my-security-group-workers-3" availabilityZones: - - eu-west-1g + - eu-west-1g instanceStorePolicy: "test" kubeletSystemReservedCpu: 750m kubeletClusterDNS: - - "1.1.1.1" - - "2.2.2.2" + - "1.1.1.1" + - "2.2.2.2" userData: | echo "Nodepool name is {{ default .key }}" capacitySpread: @@ -122,44 +122,44 @@ nodeGroups: cpu: "100" memory: "384Gi" startupTaints: - - key: testtaint1 - effect: NoSchedule - value: taint1 - - key: testtaint2 - effect: NoSchedule - value: taint2 + - key: testtaint1 + effect: NoSchedule + value: taint1 + - key: testtaint2 + effect: NoSchedule + value: taint2 autoTaint: "true" nodes-explicittypes: instances: instanceTypes: - - t3a.large - - t3a.xlarge + - t3a.large + - t3a.xlarge nodeClassRef: name: default #Default cluster Settings clusterName: "eks-dev" subnetSelectorTerms: - - tags: - Name: "eks-subnet-1" - - tags: - Name: "eks-subnet-2" - - tags: - Name: "eks-subnet-3" +- tags: + Name: "eks-subnet-1" +- tags: + Name: "eks-subnet-2" +- tags: + Name: "eks-subnet-3" securityGroupSelectorTerms: - - tags: - Name: "my-security-group-1" - - tags: - Name: "my-security-group-2" - - tags: - Name: "my-security-group-3" +- tags: + Name: "my-security-group-1" +- tags: + Name: "my-security-group-2" +- tags: + Name: "my-security-group-3" availabilityZones: - - eu-west-1a - - eu-west-1b - - eu-west-1c +- eu-west-1a +- eu-west-1b +- eu-west-1c excludeInstanceSize: - - metal +- metal From 9ac6094561cc02e298fd61b62284af2689d3c470 Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:32:51 +0300 Subject: [PATCH 3/9] generate --- .../examples/output/output.yaml | 1345 +++++++++-------- 1 file changed, 673 insertions(+), 672 deletions(-) diff --git a/charts/karpenter_nodes/examples/output/output.yaml b/charts/karpenter_nodes/examples/output/output.yaml index 31a8b77..6021de8 100644 --- a/charts/karpenter_nodes/examples/output/output.yaml +++ b/charts/karpenter_nodes/examples/output/output.yaml @@ -1,3 +1,4 @@ +--- # Source: karpenter_nodes/templates/priorityclass.yaml apiVersion: scheduling.k8s.io/v1 kind: PriorityClass @@ -17,17 +18,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-canary @@ -36,14 +37,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -123,17 +124,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-default @@ -142,14 +143,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -229,17 +230,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-gpu @@ -248,14 +249,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -335,17 +336,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-ingress @@ -354,14 +355,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -434,17 +435,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-jobs @@ -453,14 +454,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 9000 - throughput: 125 - volumeSize: 500Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 9000 + throughput: 125 + volumeSize: 500Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -540,17 +541,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-monitoring @@ -560,14 +561,14 @@ spec: innercomponent: monitoring managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -647,17 +648,17 @@ spec: amiFamily: AL2 amiSelectorTerms: subnetSelectorTerms: - - tags: - Name: eks-dev-eu-west-1a - - tags: - Name: eks-dev-eu-west-1b - - tags: - Name: eks-dev-eu-west-1c + - tags: + Name: eks-dev-eu-west-1a + - tags: + Name: eks-dev-eu-west-1b + - tags: + Name: eks-dev-eu-west-1c securityGroupSelectorTerms: - - tags: - Name: eks-nodes - - tags: - Name: eks-dev + - tags: + Name: eks-nodes + - tags: + Name: eks-dev tags: cluster: eks-dev nodegroup: nodes-workers @@ -666,14 +667,14 @@ spec: team: devops managed_by: karpenter blockDeviceMappings: - - deviceName: /dev/xvda - ebs: - deleteOnTermination: true - encrypted: true - iops: 3000 - throughput: 125 - volumeSize: 100Gi - volumeType: gp3 + - deviceName: /dev/xvda + ebs: + deleteOnTermination: true + encrypted: true + iops: 3000 + throughput: 125 + volumeSize: 100Gi + volumeType: gp3 detailedMonitoring: false associatePublicIPAddress: false metadataOptions: @@ -758,78 +759,78 @@ spec: nodeClassRef: name: nodes-canary-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_canary - - key: dedicated - value: canary - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_canary + - key: dedicated + value: canary + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m @@ -877,70 +878,70 @@ spec: nodeClassRef: name: nodes-default-amd64 requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m @@ -988,66 +989,66 @@ spec: nodeClassRef: name: nodes-default-amd64 requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "4" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "6" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "4" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "6" kubelet: systemReserved: cpu: 250m @@ -1096,56 +1097,56 @@ spec: nodeClassRef: name: nodes-gpu-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_gpu - - key: dedicated - value: gpu - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_gpu + - key: dedicated + value: gpu + effect: NoSchedule requirements: - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: node.kubernetes.io/instance-type - operator: In - values: - - g5.xlarge - - g5.2xlarge - - g5.4xlarge + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: node.kubernetes.io/instance-type + operator: In + values: + - g5.xlarge + - g5.2xlarge + - g5.4xlarge kubelet: systemReserved: cpu: 250m @@ -1195,65 +1196,65 @@ spec: nodeClassRef: name: nodes-ingress-multiarch taints: - - key: dedicated - effect: NoSchedule - value: nodes_ingress - - key: dedicated - value: ingress - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_ingress + - key: dedicated + value: ingress + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "8" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "6" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - arm64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "8" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "6" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - arm64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal kubelet: systemReserved: cpu: 250m @@ -1301,65 +1302,65 @@ spec: nodeClassRef: name: nodes-jobs-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_jobs - - key: dedicated - value: jobs - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_jobs + - key: dedicated + value: jobs + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "8" - - "16" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "8" + - "16" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal kubelet: systemReserved: cpu: 250m @@ -1409,60 +1410,60 @@ spec: nodeClassRef: name: nodes-monitoring-multiarch taints: - - key: dedicated - effect: NoSchedule - value: nodes_monitoring - - key: dedicated - value: monitoring - effect: NoSchedule + - key: dedicated + effect: NoSchedule + value: nodes_monitoring + - key: dedicated + value: monitoring + effect: NoSchedule requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - arm64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - on-demand - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - x1 - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - arm64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - on-demand + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - x1 + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal kubelet: systemReserved: cpu: 250m @@ -1510,74 +1511,74 @@ spec: nodeClassRef: name: nodes-workers-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_workers + - key: dedicated + effect: NoSchedule + value: nodes_workers requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - m - - r - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - m + - r + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m @@ -1625,73 +1626,73 @@ spec: nodeClassRef: name: nodes-workers-amd64 taints: - - key: dedicated - effect: NoSchedule - value: nodes_workers + - key: dedicated + effect: NoSchedule + value: nodes_workers requirements: - - key: "karpenter.k8s.aws/instance-category" - operator: In - values: - - c - - key: "karpenter.k8s.aws/instance-cpu" - operator: In - values: - - "4" - - "8" - - "12" - - "16" - - "24" - - "32" - - "48" - - key: karpenter.k8s.aws/instance-generation - operator: Gt - values: - - "3" - - key: "topology.kubernetes.io/zone" - operator: In - values: - - eu-west-1a - - eu-west-1b - - eu-west-1c - - key: "kubernetes.io/arch" - operator: In - values: - - amd64 - - key: "karpenter.sh/capacity-type" - operator: In - values: - - spot - - key: kubernetes.io/os - operator: In - values: - - linux - - key: "karpenter.k8s.aws/instance-family" - operator: NotIn - values: - - c6a - - m6a - - r6a - - c5a - - m5a - - r5a - - c6ad - - m6ad - - r6ad - - m5ad - - r5ad - - r5ad - - key: "karpenter.k8s.aws/instance-size" - operator: NotIn - values: - - metal - - key: capacity-spread - operator: In - values: - - "1" - - "2" - - "3" - - "4" - - "5" + - key: "karpenter.k8s.aws/instance-category" + operator: In + values: + - c + - key: "karpenter.k8s.aws/instance-cpu" + operator: In + values: + - "4" + - "8" + - "12" + - "16" + - "24" + - "32" + - "48" + - key: karpenter.k8s.aws/instance-generation + operator: Gt + values: + - "3" + - key: "topology.kubernetes.io/zone" + operator: In + values: + - eu-west-1a + - eu-west-1b + - eu-west-1c + - key: "kubernetes.io/arch" + operator: In + values: + - amd64 + - key: "karpenter.sh/capacity-type" + operator: In + values: + - spot + - key: kubernetes.io/os + operator: In + values: + - linux + - key: "karpenter.k8s.aws/instance-family" + operator: NotIn + values: + - c6a + - m6a + - r6a + - c5a + - m5a + - r5a + - c6ad + - m6ad + - r6ad + - m5ad + - r5ad + - r5ad + - key: "karpenter.k8s.aws/instance-size" + operator: NotIn + values: + - metal + - key: capacity-spread + operator: In + values: + - "1" + - "2" + - "3" + - "4" + - "5" kubelet: systemReserved: cpu: 250m From 177653329c440f22c1bfa9c0847c469484fbb2ec Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:33:32 +0300 Subject: [PATCH 4/9] fix --- .../karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml b/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml index 65db288..1deb47c 100644 --- a/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml +++ b/charts/karpenter_nodes/tests/nodepool_nodes_explicittypes_test.yaml @@ -52,4 +52,3 @@ tests: value: t3a.xlarge - isNull: path: spec.template.spec.requirements[6] - \ No newline at end of file From a0371a2e22680576a69b94edeac341c208cc854b Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:41:33 +0300 Subject: [PATCH 5/9] update readme --- charts/karpenter_nodes/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/karpenter_nodes/README.md b/charts/karpenter_nodes/README.md index 118a4d4..32799cd 100644 --- a/charts/karpenter_nodes/README.md +++ b/charts/karpenter_nodes/README.md @@ -64,6 +64,7 @@ Note - Most of the values can be overridden per nodegroup (If not specified, it | `instances.capacityType` | `spot`, `on-demand` (can use both on single provisioner) | `List(String)` | x | ✓ | | `instances.operatingSystems` | Allowed operating systems (`"linux"`, `"windows"`) | `List(String)` | x | ✓ | | `availabilityZones` | Availability Zones to use | `List(String)` | x | ✓ | +| `instanceTypes` | Explicit list of instance types to use (ie `m7i.xlarge`) This will ignore all sizing related requirements | `List(String)` | x | ✓ | | `expireAfter` | Specify how long node should be up before refreshing it [Documentation](https://karpenter.sh/docs/concepts/disruption/#automated-methods) | `String` | x | ✓ | | `weight` | Specify NodeGroup Weight (default is `1`) | `Integer` | x | ✓ | | `excludeFamilies` | Exclude specific instance families | `List` | x | ✓ | From 2f76fe5222af18385c326fbdd78d8b515eacf8ca Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:42:29 +0300 Subject: [PATCH 6/9] readme fixes --- charts/karpenter_nodes/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/karpenter_nodes/README.md b/charts/karpenter_nodes/README.md index 32799cd..c87b312 100644 --- a/charts/karpenter_nodes/README.md +++ b/charts/karpenter_nodes/README.md @@ -63,8 +63,8 @@ Note - Most of the values can be overridden per nodegroup (If not specified, it | `instances.cores` | Allowed cores per instance (`"4"`, `"8"`) | `List(String(int))` | x | ✓ | | `instances.capacityType` | `spot`, `on-demand` (can use both on single provisioner) | `List(String)` | x | ✓ | | `instances.operatingSystems` | Allowed operating systems (`"linux"`, `"windows"`) | `List(String)` | x | ✓ | +| `instances.instanceTypes` | Explicit list of instance types to use (ie `m7i.xlarge`) This will ignore all sizing related requirements | `List(String)` | x | ✓ | | `availabilityZones` | Availability Zones to use | `List(String)` | x | ✓ | -| `instanceTypes` | Explicit list of instance types to use (ie `m7i.xlarge`) This will ignore all sizing related requirements | `List(String)` | x | ✓ | | `expireAfter` | Specify how long node should be up before refreshing it [Documentation](https://karpenter.sh/docs/concepts/disruption/#automated-methods) | `String` | x | ✓ | | `weight` | Specify NodeGroup Weight (default is `1`) | `Integer` | x | ✓ | | `excludeFamilies` | Exclude specific instance families | `List` | x | ✓ | From daa6ddeeb399eb768ef4c9618cc0d7f7cbb67bde Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:52:49 +0300 Subject: [PATCH 7/9] align example --- charts/karpenter_nodes/examples/argocd_example.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/karpenter_nodes/examples/argocd_example.yaml b/charts/karpenter_nodes/examples/argocd_example.yaml index 25b55c9..e520cd8 100644 --- a/charts/karpenter_nodes/examples/argocd_example.yaml +++ b/charts/karpenter_nodes/examples/argocd_example.yaml @@ -9,7 +9,7 @@ spec: sources: - repoURL: 'https://opensource.fiverr.com/public_charts/' chart: karpenter_nodes - targetRevision: 1.0.0 + targetRevision: 1.0.1 helm: valueFiles: - $values/karpenter_nodes/eks-dev/common.yaml From 78d0cf07348d92e3e8eacaf15afdb21e9a67ed88 Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:56:55 +0300 Subject: [PATCH 8/9] trim --- .../examples/output/output.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/karpenter_nodes/examples/output/output.yaml b/charts/karpenter_nodes/examples/output/output.yaml index 6021de8..e29b675 100644 --- a/charts/karpenter_nodes/examples/output/output.yaml +++ b/charts/karpenter_nodes/examples/output/output.yaml @@ -791,7 +791,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -902,7 +902,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1013,7 +1013,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1109,7 +1109,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1222,7 +1222,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1329,7 +1329,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1442,7 +1442,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1539,7 +1539,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: @@ -1653,7 +1653,7 @@ spec: values: - eu-west-1a - eu-west-1b - - eu-west-1c + - eu-west-1c - key: "kubernetes.io/arch" operator: In values: From a881c6b58c2bb494f663872ac0eabb5628be7dc2 Mon Sep 17 00:00:00 2001 From: nadav buchman Date: Wed, 24 Apr 2024 11:58:59 +0300 Subject: [PATCH 9/9] more trim --- charts/karpenter_nodes/templates/nodepool.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/karpenter_nodes/templates/nodepool.yaml b/charts/karpenter_nodes/templates/nodepool.yaml index 5dda834..c2521c7 100644 --- a/charts/karpenter_nodes/templates/nodepool.yaml +++ b/charts/karpenter_nodes/templates/nodepool.yaml @@ -75,7 +75,7 @@ spec: values: {{- range $v.availabilityZones | default $.Values.availabilityZones }} - {{ . }} - {{- end }} + {{- end }} - key: "kubernetes.io/arch" operator: In values: