Skip to content

Commit b91ec0f

Browse files
committed
Kubeadm fix with VRRP
Signed-off-by: Lazar Cvetković <[email protected]>
1 parent b9b62b8 commit b91ec0f

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

configs/k8s_ha/keepalived_backup.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ vrrp_instance VI_1 {
1515
state BACKUP
1616
interface $INTERFACE_NAME
1717
virtual_router_id 51
18-
priority 101
18+
priority 100
1919
authentication {
2020
auth_type PASS
2121
auth_pass 42

configs/setup/system.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"PmuToolsRepoUrl": "https://github.com/vhive-serverless/pmu-tools",
1616
"ProtocVersion": "3.19.4",
1717
"ProtocDownloadUrlTemplate": "https://github.com/protocolbuffers/protobuf/releases/download/v%s/protoc-%s-linux-x86_64.zip",
18-
"LogVerbosity": 0,
18+
"LogVerbosity": 1,
1919
"YQDownloadUrlTemplate": "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_%s"
2020
}

scripts/cluster/create_multinode_cluster.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,19 @@ func DeployKubernetes(haReplicaCount int) error {
108108
return iperr
109109
}
110110

111-
command := `sudo kubeadm init --v=%d \
111+
command := fmt.Sprintf(`sudo kubeadm init --v=%d \
112112
--apiserver-advertise-address=%s \
113113
--cri-socket unix:///run/containerd/containerd.sock \
114114
--kubernetes-version %s \
115-
--pod-network-cidr="%s" `
116-
args := []any{configs.System.LogVerbosity, masterNodeIp, configs.Kube.K8sVersion, configs.Kube.PodNetworkCidr}
115+
--pod-network-cidr="%s" `, configs.System.LogVerbosity, masterNodeIp, configs.Kube.K8sVersion, configs.Kube.PodNetworkCidr)
117116

118117
if haReplicaCount > 0 {
119-
command += ` \
118+
command += fmt.Sprintf(`\
120119
--control-plane-endpoint "%s:%s" \
121-
--upload-certs`
122-
args = append(args, configs.Kube.CPHAEndpoint, configs.Kube.CPHAPort)
120+
--upload-certs`, configs.Kube.CPHAEndpoint, configs.Kube.CPHAPort)
123121
}
124122

125-
shellCmd := fmt.Sprintf(command, args)
123+
shellCmd := command
126124
if len(configs.Kube.AlternativeImageRepo) > 0 {
127125
shellCmd = fmt.Sprintf(shellCmd+"--image-repository %s ", configs.Kube.AlternativeImageRepo)
128126
}

0 commit comments

Comments
 (0)