forked from 2i2c-org/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment-node-placeholder.yaml
More file actions
63 lines (62 loc) · 1.91 KB
/
Copy pathdeployment-node-placeholder.yaml
File metadata and controls
63 lines (62 loc) · 1.91 KB
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
{{- if .Values.nodePlaceholder.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-placeholder
labels:
app: jupyterhub
component: node-placeholder
spec:
replicas: {{ .Values.nodePlaceholder.replicas }}
selector:
matchLabels:
app: jupyterhub
component: node-placeholder
{{- if .Values.nodePlaceholder.wait }}
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 100%
maxSurge: 0
{{- end }}
template:
metadata:
labels:
app: jupyterhub
component: node-placeholder
spec:
{{- with .Values.nodePlaceholder.nodeSelector }}
nodeSelector:
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- with concat .Values.nodePlaceholder.tolerations .Values.nodePlaceholder.extraTolerations }}
tolerations:
{{- . | toYaml | nindent 8 }}
{{- end }}
affinity:
# Require that pods run on user nodes only
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: hub.jupyter.org/node-purpose
operator: In
values: [user]
# Require that pods should not run in the same topology
podAntiAffinity:
# Enforce this at scheduling time
requiredDuringSchedulingIgnoredDuringExecution:
# Nodes with same host name are considered part of the same topology
- topologyKey: kubernetes.io/hostname
# Find matching pods to determine multiplicity per topology domain
labelSelector:
matchLabels:
app: jupyterhub
component: node-placeholder
containers:
- name: pause
image: {{ .Values.nodePlaceholder.pauseContainer.image}}
securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false
{{- end }}