From 6c56284931537ca7909444274bed8fbcf7b88153 Mon Sep 17 00:00:00 2001 From: Hitesh Makol Date: Thu, 2 Jan 2025 11:11:08 +0530 Subject: [PATCH] Removed Extra nodepool yaml file, fixed spacing --- charts/karpenter/templates/node-pool.yaml | 68 ----------------------- charts/karpenter/templates/nodePool.yaml | 2 +- 2 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 charts/karpenter/templates/node-pool.yaml diff --git a/charts/karpenter/templates/node-pool.yaml b/charts/karpenter/templates/node-pool.yaml deleted file mode 100644 index ce4ac63..0000000 --- a/charts/karpenter/templates/node-pool.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- range .Values.nodePools }} -apiVersion: karpenter.sh/v1 -kind: NodePool -metadata: - name: {{ .name }} -spec: - template: - metadata: - labels: -{{- if .labels }} -{{- range $key, $value := .labels }} - {{ $key }}: {{ $value }} -{{- end }} -{{- else }} - {} # Empty labels object if no labels are defined -{{- end }} - annotations: -{{- if .annotations }} -{{- range $key, $value := .annotations }} - {{ $key }}: {{ $value }} -{{- end }} -{{- else }} - {} # Empty annotations object if no annotations are defined -{{- end }} - spec: - requirements: -{{- if .requirements | len }} -{{- range .requirements }} - - key: {{ .key }} - operator: {{ .operator }} - values: -{{ toYaml .values | indent 12 }} -{{- if .minValues }} - minValues: {{ .minValues }} -{{- end }} -{{- end }} -{{- else }} - [] # In case requirements is empty, an empty array will be passed -{{- end }} - - taints: -{{- if .taints }} -{{- range .taints }} - - key: {{ .key }} - {{- if .value }} - value: {{ .value }} - {{- end }} - effect: {{ .effect }} -{{- end }} -{{- else }} - [] # Empty taints array if no taints are defined -{{- end }} - nodeClassRef: - group: {{ .nodeClass.group | default "karpenter.k8s.aws" }} - kind: {{ .nodeClass.kind | default "EC2NodeClass" }} - name: {{ .nodeClass.name }} - expireAfter: {{ .expireAfter | default "720h" }} - limits: -{{- if .limits.cpu }} - cpu: {{ .limits.cpu }} -{{- end }} -{{- if .limits.memory }} - memory: {{ .limits.memory }} -{{- end }} - disruption: - consolidationPolicy: {{ .disruption.consolidationPolicy | default "WhenEmptyOrUnderutilized" }} - consolidateAfter: {{ .disruption.consolidateAfter | default "1m" }} -{{- end }} diff --git a/charts/karpenter/templates/nodePool.yaml b/charts/karpenter/templates/nodePool.yaml index 9b027ba..11fc413 100644 --- a/charts/karpenter/templates/nodePool.yaml +++ b/charts/karpenter/templates/nodePool.yaml @@ -70,4 +70,4 @@ spec: disruption: consolidationPolicy: {{ .disruption.consolidationPolicy | default "WhenEmptyOrUnderutilized" }} consolidateAfter: {{ .disruption.consolidateAfter | default "1m" }} -{{- end }} +{{- end }} \ No newline at end of file