Skip to content

Commit

Permalink
Keepalived health script install bugfix
Browse files Browse the repository at this point in the history
Signed-off-by: Lazar Cvetković <[email protected]>
  • Loading branch information
cvetkovic committed Feb 20, 2024
1 parent 91fd464 commit a074619
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,18 +301,18 @@ func SetupSystem(haMode string) error {
return err
}

err = utils.CopyToDir(path.Join(k8s_ha_path, "check_apiserver.yaml"), "/etc/keepalived/check_apiserver.sh", true)
err = utils.CopyToDir(path.Join(k8s_ha_path, "check_apiserver.sh"), "/etc/keepalived/check_apiserver.sh", true)
if !utils.CheckErrorWithMsg(err, "Failed to copy files to /etc/keepalived/check_apiserver.sh!\n") {
return err
}

if haMode == "MASTER" {
err = utils.CopyToDir(path.Join(k8s_ha_path, "keepalived_master.yaml"), "/etc/keepalived/keepalived.conf", true)
err = utils.CopyToDir(path.Join(k8s_ha_path, "keepalived_master.conf"), "/etc/keepalived/keepalived.conf", true)
if !utils.CheckErrorWithMsg(err, "Failed to copy files to /etc/keepalived/keepalived.conf!\n") {
return err
}
} else {
err = utils.CopyToDir(path.Join(k8s_ha_path, "keepalived_backup.yaml"), "/etc/keepalived/keepalived.conf", true)
err = utils.CopyToDir(path.Join(k8s_ha_path, "keepalived_backup.conf"), "/etc/keepalived/keepalived.conf", true)
if !utils.CheckErrorWithMsg(err, "Failed to copy files to /etc/keepalived/keepalived.conf!\n") {
return err
}
Expand Down

0 comments on commit a074619

Please sign in to comment.