
Docker-in-docker pod doesn't work in some k8s environments because it always assumes MTU=1500, even when k8s container network's MTU is smaller than that. This causes downloads to fail intermittently in containers that run within the internal docker. Solution: allow option to override MTU in docker helm chart & the stx tool. Also: remove explicit reference to dockerd entry point script from the helm chart because its name may change in future docker image versions. TESTS ======================================= Make sure "--mtu" is passed or omitted when starting docker daemon depending on whether STX_CONTAINER_MTU is defined. Story: 2010055 Task: 45691 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: Iaee08ee8d568d28fe9e8cdc11f0308aa9ff32d42
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "stx-docker.fullname" . }}
|
|
labels:
|
|
{{- include "stx-docker.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "stx-docker.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "stx-docker.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 }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
tty: true
|
|
env:
|
|
- name: DOCKER_TLS_CERTDIR
|
|
value: ""
|
|
args:
|
|
{{- range .Values.insecureRegistries }}
|
|
- "--insecure-registry={{ . }}"
|
|
{{- end }}
|
|
{{- if .Values.mtu }}
|
|
- "--mtu={{ .Values.mtu }}"
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: shared-workspace
|
|
mountPath: {{ .Values.volumes.sharedWorkspace.mountPath }}
|
|
- name: docker-run
|
|
mountPath: {{ .Values.volumes.dockerRun.mountPath }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
dnsConfig:
|
|
{{- toYaml .Values.dnsConfig | nindent 8 }}
|
|
|
|
volumes:
|
|
- name: shared-workspace
|
|
hostPath:
|
|
path: {{ .Values.global.hostDir }}{{ .Values.volumes.sharedWorkspace.hostPath }}
|
|
- name: docker-run
|
|
hostPath:
|
|
path: {{ .Values.global.hostDir }}{{ .Values.volumes.dockerRun.hostPath }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|