diff --git a/charts/karpenter_nodes/Chart.yaml b/charts/karpenter_nodes/Chart.yaml index 06d721a..d43ead2 100644 --- a/charts/karpenter_nodes/Chart.yaml +++ b/charts/karpenter_nodes/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: karpenter_nodes -version: 1.1.1 +version: 1.1.2 description: A Helm chart for generating NodeClasses and NodePools for Karpenter maintainers: - name: nadavbuc diff --git a/charts/karpenter_nodes/templates/nodeclass.yaml b/charts/karpenter_nodes/templates/nodeclass.yaml index 407bc84..34104e1 100644 --- a/charts/karpenter_nodes/templates/nodeclass.yaml +++ b/charts/karpenter_nodes/templates/nodeclass.yaml @@ -20,8 +20,8 @@ spec: {{- fail "nodeClass error: Either IamRole or IamInstanceProfile must be defined" }} {{- end }} amiFamily: {{ $v.amiFamily | default $.Values.amiFamily }} - amiSelectorTerms: {{- if or (hasKey $v "amiSelectorTerms") (hasKey $.Values "amiSelectorTerms") }} + amiSelectorTerms: {{- toYaml ($v.amiSelectorTerms | default $.Values.amiSelectorTerms) | nindent 4 }} {{- end }} subnetSelectorTerms: diff --git a/charts/karpenter_nodes/templates/nodepool.yaml b/charts/karpenter_nodes/templates/nodepool.yaml index 50eb0a0..d412ac2 100644 --- a/charts/karpenter_nodes/templates/nodepool.yaml +++ b/charts/karpenter_nodes/templates/nodepool.yaml @@ -27,6 +27,8 @@ spec: {{- $v.nodeClassRef | toYaml | nindent 8 }} {{- else }} name: {{ $k }}-{{ $v.instances.architecture | default $.Values.instances.architecture }} + apiVersion: karpenter.sh/{{ $.Values.ApiVersion }} + kind: EC2NodeClass {{- end }} {{- if or (hasKey $v "taints") (eq ($v.autoTaint | default $.Values.autoTaint) "true") }} taints: