
Adds STX_MIRROR as environment variable on the build containers and mount the /workspace/mirrors/starlingx directory into the containers at /import/mirrors/starlingx during helm provisioning, If directory does not exists K8s will create an empty directory. Minikube mounts $STX_BUILD_HOME as /workspace hence why we need /workspace/<dir> on the yaml files which will mount our local directories into the containers. Story: 2008846 Task: 43768 Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com> Change-Id: I1983ca8868e24bb7b734f122500fcfbc167cc9f7
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "stx-builder.fullname" . }}
|
|
labels:
|
|
{{- include "stx-builder.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "stx-builder.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "stx-builder.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
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 }}
|
|
tty: true
|
|
volumeMounts:
|
|
- name: {{ .Values.volumeMounts.name }}
|
|
mountPath: {{ .Values.volumeMounts.mountPath}}
|
|
- name: {{ .Values.volumeMounts.usersetupname }}
|
|
mountPath: {{ .Values.volumeMounts.usersetupmountPath}}
|
|
- name: {{ .Values.volumeMounts.mirrorName }}
|
|
mountPath: {{ .Values.volumeMounts.mirrorMountPath }}
|
|
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
volumes:
|
|
- name: {{ .Values.volumes.name }}
|
|
hostPath:
|
|
path: {{ .Values.volumes.hostPath.path }}
|
|
- name: {{ .Values.volumes.usersetupname }}
|
|
configMap:
|
|
name: {{ .Values.volumes.configmapname }}
|
|
- name: {{ .Values.volumes.mirrorName }}
|
|
hostPath:
|
|
path: {{ .Values.volumes.mirrorHostPath.path }}
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|