mirror of https://github.com/kubernetes/kops.git
176 lines
4.8 KiB
Plaintext
176 lines
4.8 KiB
Plaintext
{{ with .Components.NodeTerminationHandler }}
|
|
# Sourced from https://github.com/aws/aws-node-termination-handler/releases/download/v1.7.0/all-resources.yaml
|
|
---
|
|
# Source: aws-node-termination-handler/templates/serviceaccount.yaml
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: aws-node-termination-handler
|
|
namespace: kube-system
|
|
labels:
|
|
app.kubernetes.io/name: aws-node-termination-handler
|
|
app.kubernetes.io/instance: aws-node-termination-handler
|
|
k8s-app: aws-node-termination-handler
|
|
app.kubernetes.io/version: "1.7.0"
|
|
---
|
|
# Source: aws-node-termination-handler/templates/clusterrole.yaml
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: aws-node-termination-handler
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- nodes
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
verbs:
|
|
- list
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods/eviction
|
|
verbs:
|
|
- create
|
|
- apiGroups:
|
|
- extensions
|
|
resources:
|
|
- daemonsets
|
|
verbs:
|
|
- get
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- daemonsets
|
|
verbs:
|
|
- get
|
|
---
|
|
# Source: aws-node-termination-handler/templates/clusterrolebinding.yaml
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: aws-node-termination-handler
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: aws-node-termination-handler
|
|
namespace: kube-system
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: aws-node-termination-handler
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
# Source: aws-node-termination-handler/templates/daemonset.linux.yaml
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: aws-node-termination-handler
|
|
namespace: kube-system
|
|
labels:
|
|
app.kubernetes.io/name: aws-node-termination-handler
|
|
app.kubernetes.io/instance: aws-node-termination-handler
|
|
k8s-app: aws-node-termination-handler
|
|
app.kubernetes.io/version: "1.7.0"
|
|
spec:
|
|
updateStrategy:
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: aws-node-termination-handler
|
|
app.kubernetes.io/instance: aws-node-termination-handler
|
|
kubernetes.io/os: linux
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: aws-node-termination-handler
|
|
app.kubernetes.io/instance: aws-node-termination-handler
|
|
k8s-app: aws-node-termination-handler
|
|
kubernetes.io/os: linux
|
|
spec:
|
|
volumes:
|
|
- name: "uptime"
|
|
hostPath:
|
|
path: "/proc/uptime"
|
|
priorityClassName: "system-node-critical"
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: "kubernetes.io/os"
|
|
operator: In
|
|
values:
|
|
- linux
|
|
- key: "kubernetes.io/arch"
|
|
operator: In
|
|
values:
|
|
- amd64
|
|
- arm64
|
|
- arm
|
|
serviceAccountName: aws-node-termination-handler
|
|
hostNetwork: true
|
|
dnsPolicy: "ClusterFirstWithHostNet"
|
|
containers:
|
|
- name: aws-node-termination-handler
|
|
image: amazon/aws-node-termination-handler:v1.7.0
|
|
imagePullPolicy: IfNotPresent
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
allowPrivilegeEscalation: false
|
|
volumeMounts:
|
|
- name: "uptime"
|
|
mountPath: "/proc/uptime"
|
|
readOnly: true
|
|
env:
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: SPOT_POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: DELETE_LOCAL_DATA
|
|
value: "true"
|
|
- name: IGNORE_DAEMON_SETS
|
|
value: "true"
|
|
- name: POD_TERMINATION_GRACE_PERIOD
|
|
value: "-1"
|
|
- name: ENABLE_SPOT_INTERRUPTION_DRAINING
|
|
value: "{{ .EnableSpotInterruptionDraining }}"
|
|
- name: ENABLE_SCHEDULED_EVENT_DRAINING
|
|
value: "{{ .EnableScheduledEventDraining }}"
|
|
- name: JSON_LOGGING
|
|
value: "true"
|
|
- name: ENABLE_PROMETHEUS_SERVER
|
|
value: "{{ .EnablePrometheusMetrics }}"
|
|
resources:
|
|
limits:
|
|
memory: 128Mi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
nodeSelector:
|
|
kubernetes.io/os: linux
|
|
tolerations:
|
|
- operator: Exists
|
|
{{ end }} |