-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Karpenter Helm Chart - includes prerequisites - IAM_Role, Tagging, AWS_AUth as well * Update values.yaml Updated Values.yaml * Added Dependency Chart, updated values.yaml * Added template folder * Removed extra Files * Incorporated Review Comments * Added nodePool YAML template , modified values yaml * Modified nodePool and values yaml files * Added comments in values.yaml --------- Co-authored-by: Abhishek Dubey <[email protected]>
- Loading branch information
1 parent
088280e
commit 905122a
Showing
2 changed files
with
137 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{{- 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 }} | ||
{{- if gt (len .requirements) 0 }} | ||
{{- range .requirements }} | ||
- key: {{ .key }} | ||
operator: {{ .operator }} | ||
values: | ||
{{ toYaml .values | indent 12 }} | ||
{{- if .minValues }} | ||
minValues: {{ .minValues }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else }} | ||
[] # Render an empty array explicitly when no requirements are defined | ||
{{- end }} | ||
{{- else }} | ||
[] # Ensure that an empty array is rendered even if the user does not specify requirements | ||
{{- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters