Skip to content

Commit

Permalink
Merge pull request #8085 from mazzy89/automated-cherry-pick-of-#7545-…
Browse files Browse the repository at this point in the history
…origin-release-1.15

Automated cherry pick of #7545: Complete support for Flatcar
  • Loading branch information
k8s-ci-robot authored Dec 11, 2019
2 parents e601be2 + 7896f62 commit a19315b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nodeup/pkg/distros/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (d Distribution) IsDebianFamily() bool {
return true
case DistributionCentos7, DistributionRhel7:
return false
case DistributionCoreOS, DistributionContainerOS:
case DistributionCoreOS, DistributionFlatcar, DistributionContainerOS:
return false
default:
klog.Fatalf("unknown distribution: %s", d)
Expand Down
4 changes: 4 additions & 0 deletions nodeup/pkg/model/kube_controller_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ func (b *KubeControllerManagerBuilder) buildPod() (*v1.Pod, error) {
// The /usr directory is read-only for CoreOS
volumePluginDir = "/var/lib/kubelet/volumeplugins/"

case distros.DistributionFlatcar:
// The /usr directory is read-only for Flatcar
volumePluginDir = "/var/lib/kubelet/volumeplugins/"

default:
volumePluginDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
}
Expand Down
4 changes: 4 additions & 0 deletions nodeup/pkg/model/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ func (b *KubeletBuilder) buildKubeletConfigSpec() (*kops.KubeletConfigSpec, erro
// The /usr directory is read-only for CoreOS
c.VolumePluginDirectory = "/var/lib/kubelet/volumeplugins/"

case distros.DistributionFlatcar:
// The /usr directory is read-only for Flatcar
c.VolumePluginDirectory = "/var/lib/kubelet/volumeplugins/"

default:
c.VolumePluginDirectory = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
}
Expand Down
3 changes: 3 additions & 0 deletions nodeup/pkg/model/miscutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func (b *MiscUtilsBuilder) Build(c *fi.ModelBuilderContext) error {
case distros.DistributionCoreOS:
klog.V(2).Infof("Detected CoreOS; won't install misc. utils")
return nil
case distros.DistributionFlatcar:
klog.V(2).Infof("Detected Flatcar; won't install misc. utils")
return nil
}

// TODO: These packages have been auto-installed for a long time, and likely we don't need all of them any longer
Expand Down
3 changes: 3 additions & 0 deletions nodeup/pkg/model/ntp.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func (b *NTPBuilder) Build(c *fi.ModelBuilderContext) error {
case distros.DistributionCoreOS:
klog.Infof("Detected CoreOS; won't install ntp")
return nil
case distros.DistributionFlatcar:
klog.Infof("Detected Flatcar; won't install ntp")
return nil
}

if b.Distribution.IsDebianFamily() {
Expand Down

0 comments on commit a19315b

Please sign in to comment.