Skip to content

Commit

Permalink
Fix install.sh to support control-plane label. (#989)
Browse files Browse the repository at this point in the history
Signed-off-by: Syulin7 <[email protected]>
  • Loading branch information
Syulin7 committed Sep 5, 2023
1 parent 46093ae commit 4afe00e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions arena-artifacts/templates/binary-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ spec:
template:
metadata:
labels:
app: binary-installer
app: binary-installer
name: binary-installer-{{ include "arena.version" . }}
{{- include "arena.labels" . | nindent 8 }}
spec:
hostNetwork: true
hostPID: true
tolerations:
- effect: NoSchedule
operator: Exists
key: node-role.kubernetes.io/control-plane
- effect: NoSchedule
operator: Exists
key: node-role.kubernetes.io/master
Expand All @@ -31,24 +34,14 @@ spec:
- key: node-role.alibabacloud.com/addon
operator: Exists
effect: NoSchedule
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
restartPolicy: Never
containers:
- name: installer
image: {{ include "arena.imagePrefix" . }}/{{ .Values.binary.image }}:{{ .Values.binary.tag }}
imagePullPolicy: {{ .Values.binary.imagePullPolicy }}
securityContext:
privileged: true
command:
command:
- sh
- -c
- |
Expand All @@ -61,7 +54,7 @@ spec:
{{- if .Values.binary.rdma }}
options="$options --rdma"
{{- end }}
nsenter -t 1 -i -p -n -u -m -- /usr/local/arena-installer/arena-installer/install.sh $options
nsenter -t 1 -i -p -n -u -m -- /usr/local/arena-installer/arena-installer/install.sh $options
env:
volumeMounts:
- name: arena-installer
Expand All @@ -87,5 +80,14 @@ spec:
values:
- binary-installer-{{ include "arena.version" . }}
topologyKey: "kubernetes.io/hostname"
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 4afe00e

Please sign in to comment.