57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ template "aws-eks-asg-rolling-update-handler.name" . }}
|
||
|
namespace: {{ template "aws-eks-asg-rolling-update-handler.namespace" . }}
|
||
|
labels:
|
||
|
{{ include "aws-eks-asg-rolling-update-handler.labels" . | indent 4 }}
|
||
|
spec:
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{ include "aws-eks-asg-rolling-update-handler.labels" . | indent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
{{ include "aws-eks-asg-rolling-update-handler.labels" . | indent 8 }}
|
||
|
spec:
|
||
|
automountServiceAccountToken: true
|
||
|
serviceAccountName: {{ template "aws-eks-asg-rolling-update-handler.serviceAccountName" . }}
|
||
|
restartPolicy: Always
|
||
|
dnsPolicy: Default
|
||
|
containers:
|
||
|
- name: {{ template "aws-eks-asg-rolling-update-handler.name" . }}
|
||
|
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
env:
|
||
|
{{- toYaml .Values.environmentVars | nindent 12 }}
|
||
|
{{- with .Values.resources }}
|
||
|
resources:
|
||
|
{{- toYaml . | nindent 12 }}
|
||
|
{{- end }}
|
||
|
volumeMounts:
|
||
|
- name: aws-token
|
||
|
mountPath: "/var/run/secrets/sts.amazonaws.com/serviceaccount/"
|
||
|
readOnly: true
|
||
|
volumes:
|
||
|
- name: aws-token
|
||
|
projected:
|
||
|
sources:
|
||
|
- serviceAccountToken:
|
||
|
path: token
|
||
|
expirationSeconds: 86400
|
||
|
audience: "sts.amazonaws.com"
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|