Skip to content

Commit

Permalink
Remove/fix more CoreOS references
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed May 23, 2020
1 parent bcb6255 commit 28db096
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 16 deletions.
4 changes: 2 additions & 2 deletions cmd/kops/update_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ func RunUpdateCluster(ctx context.Context, f *util.Factory, clusterName string,
for i := range list.Items {
instanceGroups = append(instanceGroups, &list.Items[i])

// Try to guess the path for additional third party volume plugins in CoreOS and Flatcar
// Try to guess the path for additional third party volume plugins in Flatcar
image := strings.ToLower(list.Items[i].Spec.Image)
if strings.Contains(image, "coreos") || strings.Contains(image, "flatcar") {
if strings.Contains(image, "flatcar") {
if cluster.Spec.Kubelet == nil {
cluster.Spec.Kubelet = &kops.KubeletConfigSpec{}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ An optional flag can be provided within the KubeletSpec to set a volume plugin d

Kops will set this for you based off the Operating System in use:
- ContainerOS: `/home/kubernetes/flexvolume/`
- CoreOS: `/var/lib/kubelet/volumeplugins/`
- Flatcar: `/var/lib/kubelet/volumeplugins/`
- Default (in-line with upstream k8s): `/usr/libexec/kubernetes/kubelet-plugins/volume/exec/`

If you wish to override this value, it can be done so with the following addition to the kubelet spec:
Expand Down
2 changes: 1 addition & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the private key corresponding to the public key in `kops get secrets --type sshp
creating a new cluster, the SSH public key can be specified with the `--ssh-public-key` option, and it
defaults to `~/.ssh/id_rsa.pub`.

> Note: In CoreOS, SSH username will be `core`.
> Note: In Flatcar, SSH username will be `core`.
To change the SSH public key on an existing cluster:

Expand Down
2 changes: 1 addition & 1 deletion images/utils-builder/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This docker image builds statically linked binaries, in particular socat and conntrack for use on CoreOS.
This docker image builds statically linked binaries, in particular socat and conntrack for use on Flatcar.
1 change: 0 additions & 1 deletion nodeup/pkg/distros/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func FindDistribution(rootfs string) (Distribution, error) {
klog.Warningf("error reading /etc/redhat-release: %v", err)
}

// CoreOS uses /usr/lib/os-release
// Flatcar uses /usr/lib/os-release
usrLibOsRelease, err := ioutil.ReadFile(path.Join(rootfs, "usr/lib/os-release"))
if err == nil {
Expand Down
2 changes: 1 addition & 1 deletion nodeup/pkg/model/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (b *ContainerdBuilder) Build(c *fi.ModelBuilderContext) error {
return nil
}

// @check: neither coreos or containeros need provision containerd.service, just the containerd daemon options
// @check: neither flatcar nor containeros need provision containerd.service, just the containerd daemon options
switch b.Distribution {
case distros.DistributionFlatcar:
klog.Infof("Detected Flatcar; won't install containerd")
Expand Down
2 changes: 1 addition & 1 deletion nodeup/pkg/model/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func (b *DockerBuilder) Build(c *fi.ModelBuilderContext) error {
return nil
}

// @check: neither coreos or containeros need provision docker.service, just the docker daemon options
// @check: neither flatcar nor containeros need provision docker.service, just the docker daemon options
switch b.Distribution {
case distros.DistributionFlatcar:
klog.Infof("Detected Flatcar; won't install Docker")
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/bootstrapscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (b *BootstrapScript) createProxyEnv(ps *kops.EgressProxySpec) string {
// Load the proxy environment variables
buffer.WriteString("while read in; do export $in; done < /etc/environment\n")

// Set env variables for package manager depending on OS Distribution (N/A for CoreOS)
// Set env variables for package manager depending on OS Distribution (N/A for Flatcar)
// Note: Nodeup will source the `/etc/environment` file within docker config in the correct location
buffer.WriteString("case `cat /proc/version` in\n")
buffer.WriteString("*[Dd]ebian*)\n")
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func guessSSHUser(image *ec2.Image) string {
return "admin"
case awsup.WellKnownAccountUbuntu:
return "ubuntu"
case awsup.WellKnownAccountCoreOS, awsup.WellKnownAccountFlatcar:
case awsup.WellKnownAccountFlatcar:
return "core"
}

Expand Down
4 changes: 2 additions & 2 deletions upup/pkg/fi/cloudup/apply_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1226,11 +1226,11 @@ func (c *ApplyClusterCmd) AddFileAssets(assetBuilder *assets.AssetBuilder) error
c.Assets = append(c.Assets, BuildMirroredAsset(u, hash))
}

// TODO figure out if we can only do this for CoreOS only and GCE Container OS
// TODO figure out if we can only do this for Flatcar only and GCE Container OS
// TODO It is very difficult to pre-determine what OS an ami is, and if that OS needs socat
// At this time we just copy the socat and conntrack binaries to all distros.
// Most distros will have their own socat and conntrack binary.
// Container operating systems like CoreOS need to have socat and conntrack added to them.
// Container operating systems like Flatcar need to have socat and conntrack added to them.
{
utilsLocation, hash, err := KopsFileUrl("linux/amd64/utils.tar.gz", assetBuilder)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions upup/pkg/fi/nodeup/nodetasks/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const (
// package (protokube, kubelet). Maybe we should have the idea of a "system" package.
centosSystemdSystemPath = "/usr/lib/systemd/system"

coreosSystemdSystemPath = "/etc/systemd/system"

flatcarSystemdSystemPath = "/etc/systemd/system"

containerosSystemdSystemPath = "/etc/systemd/system"
Expand Down Expand Up @@ -150,8 +148,6 @@ func (e *Service) systemdSystemPath(target tags.HasTags) (string, error) {
return debianSystemdSystemPath, nil
} else if target.HasTag(tags.TagOSFamilyRHEL) {
return centosSystemdSystemPath, nil
} else if target.HasTag("_coreos") {
return coreosSystemdSystemPath, nil
} else if target.HasTag("_flatcar") {
return flatcarSystemdSystemPath, nil
} else if target.HasTag("_containeros") {
Expand Down

0 comments on commit 28db096

Please sign in to comment.