Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the https prefix #2

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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