Skip to content

Commit

Permalink
Merge pull request #2 from wenchajun/kubesphere-feature-1.13
Browse files Browse the repository at this point in the history
Remove the https prefix
  • Loading branch information
benjaminhuo authored Mar 20, 2023
2 parents 73bb52c + 8d1643b commit 71a4c6a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions keadm/cmd/keadm/app/cmd/edge/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ package edge
import (
"errors"
"fmt"
corev1 "k8s.io/api/core/v1"
"net"
"os"
"path/filepath"
"strconv"
"strings"
"time"

"k8s.io/kubernetes/pkg/apis/core"


"github.com/blang/semver"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -329,24 +330,24 @@ func createEdgeConfigFiles(opt *common.JoinOptions) error {
edgeCoreConfig.Modules.EdgeStream.TunnelServer = net.JoinHostPort(host, strconv.Itoa(constants.DefaultTunnelPort))

if opt.QuicPort != "" {
edgeCoreConfig.Modules.EdgeHub.Quic.Server = "https://" + net.JoinHostPort(host, opt.QuicPort)
edgeCoreConfig.Modules.EdgeHub.Quic.Server = net.JoinHostPort(host, opt.QuicPort)
} else {
edgeCoreConfig.Modules.EdgeHub.Quic.Server = "https://" + net.JoinHostPort(host, "10001")
edgeCoreConfig.Modules.EdgeHub.Quic.Server = net.JoinHostPort(host, "10001")
}

if opt.TunnelPort != "" {
edgeCoreConfig.Modules.EdgeStream.TunnelServer = "https://" + net.JoinHostPort(host, opt.TunnelPort)
edgeCoreConfig.Modules.EdgeStream.TunnelServer = net.JoinHostPort(host, opt.TunnelPort)
} else {
edgeCoreConfig.Modules.EdgeStream.TunnelServer = "https://" + net.JoinHostPort(host, "10004")
edgeCoreConfig.Modules.EdgeStream.TunnelServer = net.JoinHostPort(host, "10004")
}

// add NoSchedule taints
if opt.HasDefaultTaint {
taint := core.Taint{
taint := corev1.Taint{
Key: "node-role.kubernetes.io/edge",
Effect: "NoSchedule",
}
edgeCoreConfig.Modules.Edged.RegisterWithTaints = append(edgeCoreConfig.Modules.Edged.RegisterWithTaints, taint)
edgeCoreConfig.Modules.Edged.TailoredKubeletConfig.RegisterWithTaints = append(edgeCoreConfig.Modules.Edged.TailoredKubeletConfig.RegisterWithTaints, taint)
}

if len(opt.Labels) > 0 {
Expand Down

0 comments on commit 71a4c6a

Please sign in to comment.