feat: version bumps for 1.22 support

This commit is contained in:
Stefan Reimer 2022-04-08 17:10:17 +02:00
parent 7a247126ea
commit dd0ef79dee
20 changed files with 72 additions and 68 deletions

View File

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

View File

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

View File

@ -1,25 +1,25 @@
apiVersion: v2 apiVersion: v2
name: aws-node-termination-handler appVersion: 1.16.0
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 home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources: keywords:
- https://github.com/aws/aws-node-termination-handler/ - aws
- https://github.com/aws/eks-charts/ - eks
- ec2
- node-termination
- spot
kubeVersion: '>= 1.16-0'
maintainers: maintainers:
- name: Brandon Wagner - email: bwagner5@users.noreply.github.com
name: Brandon Wagner
url: https://github.com/bwagner5 url: https://github.com/bwagner5
email: bwagner5@users.noreply.github.com - email: jillmon@users.noreply.github.com
- name: Jillian Montalvo name: Jillian Kuentz
url: https://github.com/jillmon url: https://github.com/jillmon
email: jillmon@users.noreply.github.com 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` | | `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` | | `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` | | `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` | | `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` | | `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` | | `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` | | `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` | | `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. | `""` | | `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. | `""` | | `linuxDnsPolicy` | DNS policy for the Linux DaemonSet. | `""` |
| `windowsDnsPolicy` | DNS policy for the Windows 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. | `{}` | | `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 kind: DaemonSet
metadata: metadata:
name: {{ include "aws-node-termination-handler.fullname" . }} name: {{ include "aws-node-termination-handler.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }} {{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec: spec:
@ -45,6 +46,10 @@ spec:
{{- end }} {{- end }}
hostNetwork: {{ .Values.useHostNetwork }} hostNetwork: {{ .Values.useHostNetwork }}
dnsPolicy: {{ default .Values.linuxDnsPolicy .Values.dnsPolicy }} dnsPolicy: {{ default .Values.linuxDnsPolicy .Values.dnsPolicy }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
containers: containers:
- name: aws-node-termination-handler - name: aws-node-termination-handler
{{- with .Values.securityContext }} {{- with .Values.securityContext }}
@ -92,6 +97,8 @@ spec:
value: {{ .Values.cordonOnly | quote }} value: {{ .Values.cordonOnly | quote }}
- name: TAINT_NODE - name: TAINT_NODE
value: {{ .Values.taintNode | quote }} value: {{ .Values.taintNode | quote }}
- name: EXCLUDE_FROM_LOAD_BALANCERS
value: {{ .Values.excludeFromLoadBalancers | quote }}
- name: DELETE_LOCAL_DATA - name: DELETE_LOCAL_DATA
value: {{ .Values.deleteLocalData | quote }} value: {{ .Values.deleteLocalData | quote }}
- name: IGNORE_DAEMON_SETS - name: IGNORE_DAEMON_SETS

View File

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

View File

@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "aws-node-termination-handler.fullname" . }} name: {{ include "aws-node-termination-handler.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: labels:
{{- include "aws-node-termination-handler.labels" . | nindent 4 }} {{- include "aws-node-termination-handler.labels" . | nindent 4 }}
spec: spec:
@ -42,6 +43,10 @@ spec:
{{- with .Values.terminationGracePeriodSeconds }} {{- with .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ . }} terminationGracePeriodSeconds: {{ . }}
{{- end }} {{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
containers: containers:
- name: aws-node-termination-handler - name: aws-node-termination-handler
{{- with .Values.securityContext }} {{- with .Values.securityContext }}
@ -89,6 +94,8 @@ spec:
value: {{ .Values.cordonOnly | quote }} value: {{ .Values.cordonOnly | quote }}
- name: TAINT_NODE - name: TAINT_NODE
value: {{ .Values.taintNode | quote }} value: {{ .Values.taintNode | quote }}
- name: EXCLUDE_FROM_LOAD_BALANCERS
value: {{ .Values.excludeFromLoadBalancers | quote }}
- name: DELETE_LOCAL_DATA - name: DELETE_LOCAL_DATA
value: {{ .Values.deleteLocalData | quote }} value: {{ .Values.deleteLocalData | quote }}
- name: IGNORE_DAEMON_SETS - name: IGNORE_DAEMON_SETS

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -81,6 +81,9 @@ cordonOnly: false
# Taint node upon spot interruption termination notice. # Taint node upon spot interruption termination notice.
taintNode: false 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 # deleteLocalData tells kubectl to continue even if there are pods using
# emptyDir (local data that will be deleted when the node is drained). # emptyDir (local data that will be deleted when the node is drained).
deleteLocalData: true deleteLocalData: true
@ -219,6 +222,7 @@ useHostNetwork: true
# Daemonset DNS policy # Daemonset DNS policy
dnsPolicy: "" dnsPolicy: ""
dnsConfig: {}
linuxDnsPolicy: ClusterFirstWithHostNet linuxDnsPolicy: ClusterFirstWithHostNet
windowsDnsPolicy: ClusterFirst windowsDnsPolicy: ClusterFirst

View File

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

View File

@ -3,9 +3,8 @@ set -ex
NTH_VERSION=$(yq eval '.dependencies[] | select(.name=="aws-node-termination-handler") | .version' Chart.yaml) 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
#rm -rf charts/aws-node-termination-handler helm pull eks/aws-node-termination-handler --untar --untardir charts --version $NTH_VERSION
#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 # diff -tuNr charts/aws-node-termination-handler.orig charts/aws-node-termination-handler > nth.patch
patch -p0 -i nth.patch --no-backup-if-mismatch patch -p0 -i nth.patch --no-backup-if-mismatch

View File

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