Merge pull request #288 from hongchaodeng/r
const: unify DefaultBackupPodHTTPPort
This commit is contained in:
Коммит
cc9be8927d
|
@ -21,7 +21,7 @@ const (
|
|||
DefaultRequestTimeout = 5 * time.Second
|
||||
DefaultSnapshotInterval = 1800 * time.Second
|
||||
|
||||
DefaultBackupPodHTTPPort = "19999"
|
||||
DefaultBackupPodHTTPPort = 19999
|
||||
|
||||
BackupDir = "/home/backup/"
|
||||
)
|
||||
|
|
|
@ -161,8 +161,8 @@ func CreateBackupReplicaSetAndService(kubecli *unversioned.Client, clusterName,
|
|||
Ports: []api.ServicePort{
|
||||
{
|
||||
Name: "backup-service",
|
||||
Port: 19999, // default port
|
||||
TargetPort: intstr.FromInt(19999),
|
||||
Port: constants.DefaultBackupPodHTTPPort,
|
||||
TargetPort: intstr.FromInt(constants.DefaultBackupPodHTTPPort),
|
||||
Protocol: api.ProtocolTCP,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -109,7 +109,7 @@ func GetNodePortString(srv *api.Service) string {
|
|||
}
|
||||
|
||||
func MakeBackupHostPort(clusterName string) string {
|
||||
return fmt.Sprintf("%s:%s", makeBackupName(clusterName), constants.DefaultBackupPodHTTPPort)
|
||||
return fmt.Sprintf("%s:%d", makeBackupName(clusterName), constants.DefaultBackupPodHTTPPort)
|
||||
}
|
||||
|
||||
func PodWithAddMemberInitContainer(p *api.Pod, name string, peerURLs []string, cs *spec.ClusterSpec) *api.Pod {
|
||||
|
|
Загрузка…
Ссылка в новой задаче