Skip to content

Commit

Permalink
Merge pull request #8164 from hakman/update-rhel-8
Browse files Browse the repository at this point in the history
Update support for RHEL 8
  • Loading branch information
k8s-ci-robot authored Dec 27, 2019
2 parents 8436a3e + e90474d commit ac76e81
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nodeup/pkg/distros/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (d Distribution) IsDebianFamily() bool {
return true
case DistributionXenial, DistributionBionic:
return true
case DistributionCentos7, DistributionRhel7:
case DistributionCentos7, DistributionRhel7, DistributionCentos8, DistributionRhel8:
return false
case DistributionCoreOS, DistributionFlatcar, DistributionContainerOS:
return false
Expand Down
4 changes: 2 additions & 2 deletions nodeup/pkg/model/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (b *FirewallBuilder) buildSystemdService() *nodetasks.Service {
manifest.Set("Unit", "Before", "network.target")
manifest.Set("Service", "Type", "oneshot")
manifest.Set("Service", "RemainAfterExit", "yes")
manifest.Set("Service", "ExecStart", "/home/kubernetes/bin/iptables-setup")
manifest.Set("Service", "ExecStart", "/opt/kops/helpers/iptables-setup")
manifest.Set("Install", "WantedBy", "basic.target")

manifestString := manifest.Render()
Expand Down Expand Up @@ -87,7 +87,7 @@ iptables -A FORWARD -w -p ICMP -j ACCEPT
fi
`
return &nodetasks.File{
Path: "/home/kubernetes/bin/iptables-setup",
Path: "/opt/kops/helpers/iptables-setup",
Contents: fi.NewStringResource(script),
Type: nodetasks.FileType_File,
Mode: s("0755"),
Expand Down
2 changes: 1 addition & 1 deletion nodeup/pkg/model/miscutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (b *MiscUtilsBuilder) Build(c *fi.ModelBuilderContext) error {
packages = append(packages, "apt-transport-https")
} else if b.Distribution.IsRHELFamily() {
packages = append(packages, "curl")
packages = append(packages, "python")
packages = append(packages, "python2")
packages = append(packages, "git")
} else {
klog.Warningf("unknown distribution, skipping misc utils install: %v", b.Distribution)
Expand Down
10 changes: 8 additions & 2 deletions nodeup/pkg/model/ntp.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ func (b *NTPBuilder) Build(c *fi.ModelBuilderContext) error {
c.AddTask(&nodetasks.Package{Name: "ntp"})
c.AddTask((&nodetasks.Service{Name: "ntp"}).InitDefaults())
} else if b.Distribution.IsRHELFamily() {
c.AddTask(&nodetasks.Package{Name: "ntp"})
c.AddTask((&nodetasks.Service{Name: "ntpd"}).InitDefaults())
switch b.Distribution {
case distros.DistributionCentos8, distros.DistributionRhel8:
c.AddTask(&nodetasks.Package{Name: "chrony"})
c.AddTask((&nodetasks.Service{Name: "chronyd"}).InitDefaults())
default:
c.AddTask(&nodetasks.Package{Name: "ntp"})
c.AddTask((&nodetasks.Service{Name: "ntpd"}).InitDefaults())
}
} else {
klog.Warningf("unknown distribution, skipping ntp install: %v", b.Distribution)
return nil
Expand Down
Empty file.
Empty file.

0 comments on commit ac76e81

Please sign in to comment.