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

Commit

Permalink
remove docker from provisioning install
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz authored and jackfrancis committed May 18, 2018
1 parent 1462676 commit 234cf4c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parts/k8s/kubernetesagentcustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ write_files:
content: !!binary |
{{WrapAsVariable "provisionSource"}}

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

- path: "/etc/kubernetes/certs/ca.crt"
permissions: "0644"
Expand Down Expand Up @@ -117,7 +119,10 @@ AGENT_ARTIFACTS_CONFIG_PLACEHOLDER
content: |
#!/bin/bash
/usr/bin/mkdir -p /etc/kubernetes/manifests
{{if .RequiresDocker}}
usermod -aG docker {{WrapAsVariable "username"}}
{{end}}
systemctl enable rpcbind
systemctl enable rpc-statd
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 @@ -351,7 +353,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
10 changes: 10 additions & 0 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,11 @@ func (a *AgentPoolProfile) HasDisks() bool {
return len(a.DiskSizesGB) > 0
}

// RequiresDocker returns if the kubernetes settings require docker to be installed.
func (a *AgentPoolProfile) RequiresDocker() bool {
return a.KubernetesConfig.ContainerRuntime == "docker"
}

// HasSecrets returns true if the customer specified secrets to install
func (w *WindowsProfile) HasSecrets() bool {
return len(w.Secrets) > 0
Expand Down Expand Up @@ -885,3 +890,8 @@ func (k *KubernetesConfig) PrivateJumpboxProvision() bool {
}
return false
}

// RequiresDocker returns if the kubernetes settings require docker to be installed.
func (k *KubernetesConfig) RequiresDocker() bool {
return k.ContainerRuntime == "docker"
}
10 changes: 10 additions & 0 deletions pkg/api/vlabs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,17 @@ func (a *AgentPoolProfile) SetSubnet(subnet string) {
a.subnet = subnet
}

// RequiresDocker returns if the kubernetes settings require docker to be installed.
func (a *AgentPoolProfile) RequiresDocker() bool {
return a.KubernetesConfig.ContainerRuntime == "docker"
}

// IsSwarmMode returns true if this template is for Swarm Mode orchestrator
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 {
return k.ContainerRuntime == "docker"
}

0 comments on commit 234cf4c

Please sign in to comment.