Skip to content

Commit

Permalink
Merge pull request labring#535 from oldthreefeng/hotfix_1191
Browse files Browse the repository at this point in the history
fix labring#534 only for 1.19.1 and 1.19.2
  • Loading branch information
oldthreefeng authored Nov 23, 2020
2 parents ff49d8c + 1c1bf70 commit 696c670
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (s *SealosInstaller) SendKubeConfigs(masters []string) {
s.sendKubeConfigFile(masters, "controller-manager.conf")
s.sendKubeConfigFile(masters, "scheduler.conf")

if s.to11911192() {
if s.to11911192(masters) {
logger.Info("set 1191 1192 config")
}
}
Expand All @@ -182,15 +182,15 @@ func (s *SealosInstaller) SendJoinMasterKubeConfigs(masters []string) {
s.sendKubeConfigFile(masters, "admin.conf")
s.sendKubeConfigFile(masters, "controller-manager.conf")
s.sendKubeConfigFile(masters, "scheduler.conf")
if s.to11911192() {
if s.to11911192(masters) {
logger.Info("set 1191 1192 config")
}
}

func (s *SealosInstaller) to11911192() (to11911192 bool) {
func (s *SealosInstaller) to11911192(masters []string) (to11911192 bool) {
// fix > 1.19.1 kube-controller-manager and kube-scheduler use the LocalAPIEndpoint instead of the ControlPlaneEndpoint.
if VersionToIntAll(Version) >= 1191 && VersionToIntAll(Version) <= 1192 {
for _, v := range s.Masters {
for _, v := range masters {
ip := IpFormat(v)
// use grep -qF if already use sed then skip....
cmd := fmt.Sprintf(`grep -qF "apiserver.cluster.local" %s && \
Expand Down

0 comments on commit 696c670

Please sign in to comment.