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

Commit

Permalink
add additional k8s dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jun 25, 2019
1 parent ec4cba5 commit 42fd5ae
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pkg/apps/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,20 @@ func (k kubernetes) ApplyPhase(sys *Config, ctx *SystemContext) ([]Command, File
AddPackage("kubeadm=="+sys.Kubernetes.Version+"-00", &DEBIAN_LIKE).
AddPackage("kubectl=="+sys.Kubernetes.Version+"-00", &DEBIAN_LIKE)

sys.AddPackage("socat jq ebtables ntp libseccomp nfs-utils", &REDHAT_LIKE)
sys.AddPackage("socat jq ebtables ntp libseccomp2 nfs-client", &DEBIAN_LIKE)

sys.Environment["KUBECONFIG"] = "/etc/kubernetes/admin.conf"
// sys.Sysctls["vm.swappiness"] = "0"
return []Command{}, Filesystem{}, nil
sys.Sysctls["vm.swappiness"] = "0"
sys.Sysctls["net.bridge.bridge-nf-call-iptables"] = "1"
sys.Sysctls["net.bridge.bridge-nf-call-ip6tables"] = "1"
sys.Sysctls["net.ipv4.ip_forward"] = "1"

fs := Filesystem{}
fs["/etc/modules-load.d/kubernetes.conf"] = File{Content: "overlay\nbr_netfilter"}

//TODO(moshloop) ensure kernel modules are loaded: overlay and br_netfilter

return []Command{}, fs, nil

}

0 comments on commit 42fd5ae

Please sign in to comment.