mirror of https://github.com/kubernetes/kops.git
Update support for RHEL 8
This commit is contained in:
parent
7031676f9b
commit
e90474d593
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
@ -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"),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue