feat: version bumps for 1.22 support

This commit is contained in:
Stefan Reimer 2022-04-08 17:10:17 +02:00
parent 4bc60e3620
commit 9d4bb288f4
20 changed files with 72 additions and 68 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-addons
description: KubeZero umbrella chart for various optional cluster addons
type: application
version: 0.4.2
version: 0.4.4
home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords:
@ -15,7 +15,7 @@ maintainers:
email: stefan@zero-downtime.net
dependencies:
- name: aws-node-termination-handler
version: 0.16.0
version: 0.18.0
# repository: https://aws.github.io/eks-charts
condition: aws-node-termination-handler.enabled
kubeVersion: ">= 1.20.0"

View File

@ -20,3 +20,4 @@
.idea/
*.tmproj
.vscode/
example-values*.yaml

View File

@ -1,25 +1,25 @@
apiVersion: v2
name: aws-node-termination-handler
appVersion: 1.16.0
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/aws-node-termination-handler/
- https://github.com/aws/eks-charts/
keywords:
- aws
- eks
- ec2
- node-termination
- spot
kubeVersion: '>= 1.16-0'
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
- email: bwagner5@users.noreply.github.com
name: Brandon Wagner
url: https://github.com/bwagner5
- email: jillmon@users.noreply.github.com
name: Jillian Kuentz
url: https://github.com/jillmon
name: aws-node-termination-handler
sources:
- https://github.com/aws/aws-node-termination-handler/
- https://github.com/aws/eks-charts/
type: application
version: 0.18.0

View File

@ -76,6 +76,7 @@ The configuration in this table applies to all AWS Node Termination Handler mode
| `dryRun` | If `true`, only log if a node would be drained. | `false` |
| `cordonOnly` | If `true`, nodes will be cordoned but not drained when an interruption event occurs. | `false` |
| `taintNode` | If `true`, nodes will be tainted when an interruption event occurs. Currently used taint keys are `aws-node-termination-handler/scheduled-maintenance`, `aws-node-termination-handler/spot-itn`, `aws-node-termination-handler/asg-lifecycle-termination` and `aws-node-termination-handler/rebalance-recommendation`. | `false` |
| `excludeFromLoadBalancers` | If `true`, nodes will be marked for exclusion from load balancers before they are cordoned. This applies the `node.kubernetes.io/exclude-from-external-load-balancers` label to enable the ServiceNodeExclusion feature gate. The label will not be modified or removed for nodes that already have it. | `false` |
| `deleteLocalData` | If `true`, continue even if there are pods using local data that will be deleted when the node is drained. | `true` |
| `ignoreDaemonSets` | If `true`, skip terminating daemon set managed pods. | `true` |
| `podTerminationGracePeriod` | The time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used, which defaults to 30 seconds if not specified for the pod. | `-1` |
@ -133,6 +134,7 @@ The configuration in this table applies to AWS Node Termination Handler in IMDS
| `podMonitor.sampleLimit` | Number of scraped samples accepted. | `5000` |
| `useHostNetwork` | If `true`, enables `hostNetwork` for the Linux DaemonSet. NOTE: setting this to `false` may cause issues accessing IMDSv2 if your account is not configured with an IP hop count of 2 see [Metrics Endpoint Considerations](#metrics-endpoint-considerations) | `true` |
| `dnsPolicy` | If specified, this overrides `linuxDnsPolicy` and `windowsDnsPolicy` with a single policy. | `""` |
| `dnsConfig` | If specified, this sets the dnsConfig: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config | `{}` |
| `linuxDnsPolicy` | DNS policy for the Linux DaemonSet. | `""` |
| `windowsDnsPolicy` | DNS policy for the Windows DaemonSet. | `""` |
| `daemonsetNodeSelector` | Expressions to select a node by it's labels for DaemonSet pod assignment. For backwards compatibility the `nodeSelector` value has priority over this but shouldn't be used. | `{}` |

View File

@ -1,5 +0,0 @@
enableSqsTerminationDraining: false
targetNodeOs: linux
enableProbesServer: true

View File

@ -1,5 +0,0 @@
enableSqsTerminationDraining: false
targetNodeOs: windows
enableProbesServer: true

View File

@ -1,13 +0,0 @@
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

View File

@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec:
@ -45,6 +46,10 @@ spec:
{{- end }}
hostNetwork: {{ .Values.useHostNetwork }}
dnsPolicy: {{ default .Values.linuxDnsPolicy .Values.dnsPolicy }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: aws-node-termination-handler
{{- with .Values.securityContext }}
@ -92,6 +97,8 @@ spec:
value: {{ .Values.cordonOnly | quote }}
- name: TAINT_NODE
value: {{ .Values.taintNode | quote }}
- name: EXCLUDE_FROM_LOAD_BALANCERS
value: {{ .Values.excludeFromLoadBalancers | quote }}
- name: DELETE_LOCAL_DATA
value: {{ .Values.deleteLocalData | quote }}
- name: IGNORE_DAEMON_SETS
@ -152,9 +159,9 @@ spec:
containerPort: {{ .Values.probes.httpGet.port }}
{{- end }}
{{- if .Values.enablePrometheusServer }}
- name: http-metrics
protocol: TCP
containerPort: {{ .Values.prometheusServerPort }}
- name: http-metrics
protocol: TCP
containerPort: {{ .Values.prometheusServerPort }}
{{- end }}
{{- end }}
{{- if .Values.enableProbesServer }}

View File

@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "aws-node-termination-handler.fullnameWindows" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec:
@ -45,6 +46,10 @@ spec:
{{- end }}
hostNetwork: false
dnsPolicy: {{ default .Values.windowsDnsPolicy .Values.dnsPolicy }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: aws-node-termination-handler
{{- with .Values.securityContext }}
@ -92,6 +97,8 @@ spec:
value: {{ .Values.cordonOnly | quote }}
- name: TAINT_NODE
value: {{ .Values.taintNode | quote }}
- name: EXCLUDE_FROM_LOAD_BALANCERS
value: {{ .Values.excludeFromLoadBalancers | quote }}
- name: DELETE_LOCAL_DATA
value: {{ .Values.deleteLocalData | quote }}
- name: IGNORE_DAEMON_SETS
@ -151,10 +158,10 @@ spec:
hostPort: {{ .Values.probes.httpGet.port }}
{{- end }}
{{- if .Values.enablePrometheusServer }}
- name: http-metrics
protocol: TCP
containerPort: {{ .Values.prometheusServerPort }}
hostPort: {{ .Values.prometheusServerPort }}
- name: http-metrics
protocol: TCP
containerPort: {{ .Values.prometheusServerPort }}
hostPort: {{ .Values.prometheusServerPort }}
{{- end }}
{{- end }}
{{- if .Values.enableProbesServer }}

View File

@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec:
@ -42,6 +43,10 @@ spec:
{{- with .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ . }}
{{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: aws-node-termination-handler
{{- with .Values.securityContext }}
@ -89,6 +94,8 @@ spec:
value: {{ .Values.cordonOnly | quote }}
- name: TAINT_NODE
value: {{ .Values.taintNode | quote }}
- name: EXCLUDE_FROM_LOAD_BALANCERS
value: {{ .Values.excludeFromLoadBalancers | quote }}
- name: DELETE_LOCAL_DATA
value: {{ .Values.deleteLocalData | quote }}
- name: IGNORE_DAEMON_SETS
@ -165,9 +172,9 @@ spec:
protocol: TCP
containerPort: {{ .Values.probes.httpGet.port }}
{{- if .Values.enablePrometheusServer }}
- name: http-metrics
protocol: TCP
containerPort: {{ .Values.prometheusServerPort }}
- name: http-metrics
protocol: TCP
containerPort: {{ .Values.prometheusServerPort }}
{{- end }}
livenessProbe:
{{- toYaml .Values.probes | nindent 12 }}

View File

@ -3,6 +3,7 @@ apiVersion: {{ include "aws-node-termination-handler.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec:

View File

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ template "aws-node-termination-handler.fullname" . }}
{{- if .Values.podMonitor.namespace }}
namespace: {{ .Values.podMonitor.namespace }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.podMonitor.namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
{{- with .Values.podMonitor.labels }}

View File

@ -19,8 +19,8 @@ spec:
max: {{ .Values.prometheusServerPort }}
{{- end }}
{{- if .Values.enableProbesServer }}
- min: {{ .Values.probesServerPort }}
max: {{ .Values.probesServerPort }}
- min: {{ .Values.probes.httpGet.port }}
max: {{ .Values.probes.httpGet.port }}
{{- end }}
{{- end }}
readOnlyRootFilesystem: false

View File

@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec:

View File

@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "aws-node-termination-handler.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}

View File

@ -3,9 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "aws-node-termination-handler.fullname" . }}
{{- if .Values.serviceMonitor.namespace }}
namespace: {{ .Values.serviceMonitor.namespace }}
{{- end }}
namespace: {{ default .Release.Namespace .Values.serviceMonitor.namespace }}
labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}

View File

@ -81,6 +81,9 @@ cordonOnly: false
# Taint node upon spot interruption termination notice.
taintNode: false
# Exclude node from load balancer before cordoning via the ServiceNodeExclusion feature gate.
excludeFromLoadBalancers: false
# deleteLocalData tells kubectl to continue even if there are pods using
# emptyDir (local data that will be deleted when the node is drained).
deleteLocalData: true
@ -219,6 +222,7 @@ useHostNetwork: true
# Daemonset DNS policy
dnsPolicy: ""
dnsConfig: {}
linuxDnsPolicy: ClusterFirstWithHostNet
windowsDnsPolicy: ClusterFirst

View File

@ -9,6 +9,7 @@ spec:
jobTemplate:
spec:
backoffLimit: 1
activeDeadlineSeconds: 300
ttlSecondsAfterFinished: 3600
template:
spec:

View File

@ -3,9 +3,8 @@ set -ex
NTH_VERSION=$(yq eval '.dependencies[] | select(.name=="aws-node-termination-handler") | .version' Chart.yaml)
# Disabled until these AWS "pros" bump the chart number
#rm -rf charts/aws-node-termination-handler
#helm pull eks/aws-node-termination-handler --untar --untardir charts --version $NTH_VERSION
rm -rf charts/aws-node-termination-handler
helm pull eks/aws-node-termination-handler --untar --untardir charts --version $NTH_VERSION
# diff -tuNr charts/aws-node-termination-handler.orig charts/aws-node-termination-handler > nth.patch
patch -p0 -i nth.patch --no-backup-if-mismatch

View File

@ -26,8 +26,8 @@ aws-node-termination-handler:
fullnameOverride: "aws-node-termination-handler"
image:
tag: v1.14.1
#image:
# tag: v1.14.1
# -- "aws-node-termination-handler/${ClusterName}"
managedAsgTag: "aws-node-termination-handler/managed"