X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=deploy%2Fcluster%2Ftemplates%2F_containerruntime.yaml;h=3bcf79157a236b23e79186faefd36049f064df9e;hb=HEAD;hp=bd523bdf173a4c459ca093bbb0616022b6442907;hpb=7f5b95aaf15bca22ac6506ac5e1b5db0d0437222;p=icn.git diff --git a/deploy/cluster/templates/_containerruntime.yaml b/deploy/cluster/templates/_containerruntime.yaml index bd523bd..3bcf791 100644 --- a/deploy/cluster/templates/_containerruntime.yaml +++ b/deploy/cluster/templates/_containerruntime.yaml @@ -21,25 +21,9 @@ mkdir -p /etc/containerd containerd config default | tee /etc/containerd/config.toml sed -i 's/\(.*\)\[plugins\."io\.containerd\.grpc\.v1\.cri"\.containerd\.runtimes\.runc\.options\]/&\n\1 SystemdCgroup = true/' /etc/containerd/config.toml - systemctl restart containerd -{{- else if eq .containerRuntime "docker" -}} -- path: /usr/local/bin/install-container-runtime.sh - permissions: '0777' - content: | - #!/usr/bin/env bash - set -eux -o pipefail - apt-get install -y docker-ce={{ .dockerVersion }} docker-ce-cli={{ .dockerVersion }} containerd.io={{ .containerdVersion }} - systemctl enable --now docker - usermod -aG docker ubuntu -- path: /etc/docker/daemon.json - content: | - { - "exec-opts": ["native.cgroupdriver=systemd"], - "log-driver": "json-file", - "log-opts": { - "max-size": "100m" - }, - "storage-driver": "overlay2" - } +{{- if .dockerRegistryMirrors }} + sed -i 's/endpoint = \["https:\/\/registry-1\.docker\.io"\]/endpoint = {{ append .dockerRegistryMirrors "https://registry-1.docker.io" | toJson | replace "/" "\\/" | replace "[" "\\[" | replace "]" "\\]" }}/' /etc/containerd/config.toml {{- end }} + systemctl restart containerd {{- end }} +{{- end }} \ No newline at end of file