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 stable/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
26 changes: 15 additions & 11 deletions stable/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
version: 0.16.0
appVersion: 1.14.0
description: A Helm chart for the AWS Node Termination Handler.
type: application
version: 0.16.1
appVersion: 1.14.1
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
- name: Jillian Kuentz
url: https://github.com/jillmon
email: jillmon@users.noreply.github.com
keywords:
- eks
- ec2
- node-termination
- spot
294 changes: 146 additions & 148 deletions stable/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
13 changes: 13 additions & 0 deletions stable/aws-node-termination-handler/example-values-queue.yaml
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 stable/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 }}
***********************************************************************
73 changes: 38 additions & 35 deletions stable/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,20 +29,32 @@ 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
*/}}
{{- define "aws-node-termination-handler.labels" -}}
helm.sh/chart: {{ include "aws-node-termination-handler.chart" . }}
{{ include "aws-node-termination-handler.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
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" . }}
{{- with .Values.customLabels }}
{{ toYaml . }}
{{- end }}
{{- end -}}

{{/*
Expand All @@ -53,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 -}}

{{/*
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 @@ -71,36 +93,17 @@ Create the name of the service account to use
{{- end -}}

{{/*
Get the default node selector term prefix.
*/}}
{{- 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.
The image to use
*/}}
{{- 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,7 +1,10 @@
{{- if .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -46,3 +49,4 @@ rules:
- create
- patch
{{- end }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{{- if .Values.rbac.create -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "aws-node-termination-handler.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
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