-
Notifications
You must be signed in to change notification settings - Fork 12
/
deployment.yaml
75 lines (75 loc) · 2.48 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{{- if not .Values.deployMgmtRbacOnly.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "cluster-autoscaler.fullname" . }}
namespace: {{ default .Release.Namespace .Values.namespace }}
labels:
{{- include "cluster-autoscaler.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "cluster-autoscaler.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "cluster-autoscaler.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "cluster-autoscaler.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 8085
livenessProbe:
httpGet:
path: /health-check
port: 8085
resources:
{{- toYaml .Values.resources | nindent 12 }}
command:
- /cluster-autoscaler
args:
- --cloud-provider=clusterapi
{{- if .Values.separateMgmtClusterEnabled }}
- --cloud-config=/etc/mgmt_cluster/kubeconfig
- --node-group-auto-discovery=clusterapi:namespace={{ .Values.discoveryNamespace }},clusterName={{ .Values.discoveryClusterName }}
volumeMounts:
- name: mgmt-kubeconfig
mountPath: "/etc/mgmt_cluster"
readOnly: true
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 10
{{- if .Values.separateMgmtClusterEnabled }}
volumes:
- name: mgmt-kubeconfig
secret:
secretName: "{{ .Values.mgmtKubeconfigSecretName }}"
{{- end }}
{{- end }}