Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Remove docker (#2973)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessfraz authored and jackfrancis committed Jun 25, 2018
1 parent b5f074c commit fcbf0b4
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 83 deletions.
40 changes: 0 additions & 40 deletions examples/e2e-tests/kubernetes/kubernetes-config/containerd.json

This file was deleted.

39 changes: 0 additions & 39 deletions examples/e2e-tests/kubernetes/kubernetes-config/flannel.json

This file was deleted.

9 changes: 7 additions & 2 deletions parts/k8s/kubernetesagentcustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ write_files:
content: !!binary |
{{WrapAsVariable "provisionSource"}}

{{if not .IsCoreOS}}
{{if .KubernetesConfig.RequiresDocker}}
{{if not .IsCoreOS}}
- path: "/etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf"
permissions: "0644"
owner: "root"
content: |
[Service]
MountFlags=shared
{{end}}
{{end}}
- path: "/etc/systemd/system/docker.service.d/exec_start.conf"
permissions: "0644"
owner: "root"
Expand Down Expand Up @@ -43,6 +44,7 @@ write_files:
}
}{{end}}
}
{{end}}

- path: "/etc/kubernetes/certs/ca.crt"
permissions: "0644"
Expand Down Expand Up @@ -139,7 +141,10 @@ AGENT_ARTIFACTS_CONFIG_PLACEHOLDER
content: |
#!/bin/bash
/usr/bin/mkdir -p /etc/kubernetes/manifests
{{if .KubernetesConfig.RequiresDocker}}
usermod -aG docker {{WrapAsVariable "username"}}
{{end}}
systemctl enable rpcbind
systemctl enable rpc-statd
Expand Down
10 changes: 8 additions & 2 deletions parts/k8s/kubernetescustomscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ function installContainerd() {
retrycmd_get_tarball 60 5 "$CONTAINERD_TGZ_TMP" "$CONTAINERD_DOWNLOAD_URL"
tar -xzf "$CONTAINERD_TGZ_TMP" -C /
rm -f "$CONTAINERD_TGZ_TMP"
sed -i '/\[Service\]/a ExecStartPost=\/sbin\/iptables -P FORWARD ACCEPT' /etc/systemd/system/containerd.service

echo "Successfully installed cri-containerd..."
if [[ "$CONTAINER_RUNTIME" == "clear-containers" ]] || [[ "$CONTAINER_RUNTIME" == "containerd" ]]; then
Expand Down Expand Up @@ -511,9 +512,14 @@ if [ -f $CUSTOM_SEARCH_DOMAIN_SCRIPT ]; then
fi

installDeps
installDocker

if [[ "$CONTAINER_RUNTIME" == "docker" ]]; then
installDocker
ensureDocker
fi

configureK8s
ensureDocker

configNetworkPlugin

if [[ ! -z "${MASTER_NODE}" ]]; then
Expand Down
5 changes: 5 additions & 0 deletions parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ write_files:
content: !!binary |
{{WrapAsVariable "provisionSource"}}

{{if .OrchestratorProfile.KubernetesConfig.RequiresDocker}}
{{if not .MasterProfile.IsCoreOS}}
- path: "/etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf"
permissions: "0644"
Expand Down Expand Up @@ -46,6 +47,7 @@ write_files:
"max-file": "5"
}
}
{{end}}

- path: "/etc/kubernetes/certs/ca.crt"
permissions: "0644"
Expand Down Expand Up @@ -376,7 +378,10 @@ MASTER_ARTIFACTS_CONFIG_PLACEHOLDER
systemctl restart etcd-member
retrycmd_if_failure 5 5 10 curl --retry 5 --retry-delay 10 --retry-max-time 10 --max-time 60 http://127.0.0.1:2379/v2/machines
mkdir -p /etc/kubernetes/manifests
{{if .OrchestratorProfile.KubernetesConfig.RequiresDocker}}
usermod -aG docker {{WrapAsVariable "username"}}
{{end}}
{{if EnableAggregatedAPIs}}
sudo bash /etc/kubernetes/generate-proxy-certs.sh
Expand Down
6 changes: 6 additions & 0 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -978,3 +978,9 @@ func (k *KubernetesConfig) PrivateJumpboxProvision() bool {
}
return false
}

// RequiresDocker returns if the kubernetes settings require docker to be installed.
func (k *KubernetesConfig) RequiresDocker() bool {
runtime := strings.ToLower(k.ContainerRuntime)
return runtime == "docker" || runtime == ""
}
6 changes: 6 additions & 0 deletions pkg/api/vlabs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,3 +633,9 @@ func (l *LinuxProfile) HasCustomNodesDNS() bool {
func (o *OrchestratorProfile) IsSwarmMode() bool {
return o.OrchestratorType == SwarmMode
}

// RequiresDocker returns if the kubernetes settings require docker to be installed.
func (k *KubernetesConfig) RequiresDocker() bool {
runtime := strings.ToLower(k.ContainerRuntime)
return runtime == "docker" || runtime == ""
}

0 comments on commit fcbf0b4

Please sign in to comment.