Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/helm/aws-node-termination-handler/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
.idea/
*.tmproj
.vscode/
example-values*.yaml
20 changes: 12 additions & 8 deletions config/helm/aws-node-termination-handler/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
apiVersion: v1
apiVersion: v2
name: aws-node-termination-handler
description: A Helm chart for the AWS Node Termination Handler
description: A Helm chart for the AWS Node Termination Handler.
type: application
version: 0.16.0
appVersion: 1.14.0
kubeVersion: ">= 1.16-0"
keywords:
- aws
- eks
- ec2
- node-termination
- spot
home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
- https://github.com/aws/eks-charts
- https://github.com/aws/aws-node-termination-handler/
- https://github.com/aws/eks-charts/
maintainers:
- name: Brandon Wagner
url: https://github.com/bwagner5
email: bwagner5@users.noreply.github.com
- name: Jillian Montalvo
url: https://github.com/jillmon
email: jillmon@users.noreply.github.com
keywords:
- eks
- ec2
- node-termination
- spot
294 changes: 146 additions & 148 deletions config/helm/aws-node-termination-handler/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableSqsTerminationDraining: false

targetNodeOs: linux

enableProbesServer: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableSqsTerminationDraining: false

targetNodeOs: windows

enableProbesServer: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::99999999:role/nth-role

resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi

enableSqsTerminationDraining: true
11 changes: 8 additions & 3 deletions config/helm/aws-node-termination-handler/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{ .Release.Name }} has been installed or updated. To check the status of pods, run:

kubectl get pods --namespace {{ .Values.namespace }}
***********************************************************************
* AWS Node Termination Handler *
***********************************************************************
Chart version: {{ .Chart.Version }}
App version: {{ .Chart.AppVersion }}
Image tag: {{ include "aws-node-termination-handler.image" . }}
Mode : {{ if .Values.enableSqsTerminationDraining }}Queue Processor{{ else }}IMDS{{ end }}
***********************************************************************
70 changes: 34 additions & 36 deletions config/helm/aws-node-termination-handler/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Expand the name of the chart.
*/}}
Expand Down Expand Up @@ -28,10 +29,17 @@ If release name contains chart name it will be used as a full name.
Equivalent to "aws-node-termination-handler.fullname" except that "-win" indicator is appended to the end.
Name will not exceed 63 characters.
*/}}
{{- define "aws-node-termination-handler.fullname.windows" -}}
{{- define "aws-node-termination-handler.fullnameWindows" -}}
{{- include "aws-node-termination-handler.fullname" . | trunc 59 | trimSuffix "-" | printf "%s-win" -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aws-node-termination-handler.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
Expand All @@ -44,8 +52,8 @@ app.kubernetes.io/component: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "aws-node-termination-handler.chart" . }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- with .Values.customLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}

Expand All @@ -58,10 +66,19 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
Selector labels for the deployment
*/}}
{{- define "aws-node-termination-handler.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- define "aws-node-termination-handler.selectorLabelsDeployment" -}}
{{ include "aws-node-termination-handler.selectorLabels" . }}
app.kubernetes.io/component: deployment
{{- end -}}
Comment on lines +71 to +74
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be mindful when changing immutable fields, it requires additional work when updating the helm chart to ensure high availability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cainelli this work was intended to be a breaking change and these changes were fully intentional and made with the understanding of the implications. I think there might have been a some missed communication when this was released (see above) but technically all changes to a pre v1 SemVer package are breaking.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying @stevehipwell and sorry for the grumpiness.


{{/*
Selector labels for the daemonset
*/}}
{{- define "aws-node-termination-handler.selectorLabelsDaemonset" -}}
{{ include "aws-node-termination-handler.selectorLabels" . }}
app.kubernetes.io/component: daemonset
{{- end -}}

{{/*
Expand All @@ -76,36 +93,17 @@ Create the name of the service account to use
{{- end -}}

{{/*
Get the default node selector term prefix.
The image to use
*/}}
{{- define "aws-node-termination-handler.defaultNodeSelectorTermsPrefix" -}}
kubernetes.io
{{- end -}}

{{/*
Get the default node selector OS term.
*/}}
{{- define "aws-node-termination-handler.defaultNodeSelectorTermsOs" -}}
{{- list (include "aws-node-termination-handler.defaultNodeSelectorTermsPrefix" .) "os" | join "/" -}}
{{- end -}}

{{/*
Get the default node selector Arch term.
*/}}
{{- define "aws-node-termination-handler.defaultNodeSelectorTermsArch" -}}
{{- list (include "aws-node-termination-handler.defaultNodeSelectorTermsPrefix" .) "arch" | join "/" -}}
{{- end -}}

{{/*
Get the node selector OS term.
*/}}
{{- define "aws-node-termination-handler.nodeSelectorTermsOs" -}}
{{- or .Values.nodeSelectorTermsOs (include "aws-node-termination-handler.defaultNodeSelectorTermsOs" .) -}}
{{- end -}}
{{- define "aws-node-termination-handler.image" -}}
{{- printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
{{- end }}

{{/*
Get the node selector Arch term.
*/}}
{{- define "aws-node-termination-handler.nodeSelectorTermsArch" -}}
{{- or .Values.nodeSelectorTermsArch (include "aws-node-termination-handler.defaultNodeSelectorTermsArch" .) -}}
{{/* Get PodDisruptionBudget API Version */}}
{{- define "aws-node-termination-handler.pdb.apiVersion" -}}
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
{{- print "policy/v1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand Down Expand Up @@ -48,3 +49,4 @@ rules:
- create
- patch
{{- end }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{{- if .Values.rbac.create -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ template "aws-node-termination-handler.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "aws-node-termination-handler.fullname" . }}
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: {{ template "aws-node-termination-handler.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
Loading