Skip to content

Commit

Permalink
fix: update daemons
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaods committed Oct 22, 2024
1 parent 2645837 commit e1a0b52
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
1 change: 0 additions & 1 deletion pkg/cli/cmds/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type Agent struct {
ServerURL string
APIAddressCh chan []string
DisableLoadBalancer bool
DisableServiceLB bool
ETCDAgent bool
LBServerPort int
ResolvConf string
Expand Down
7 changes: 0 additions & 7 deletions pkg/cli/cmds/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ type Server struct {
EtcdS3ConfigSecret string
EtcdS3Timeout time.Duration
EtcdS3Insecure bool
ServiceLBNamespace string
}

var (
Expand Down Expand Up @@ -216,12 +215,6 @@ var ServerFlags = []cli.Flag{
Destination: &ServerConfig.EgressSelectorMode,
Value: "agent",
},
&cli.StringFlag{
Name: "servicelb-namespace",
Usage: "(networking) Namespace of the pods for the servicelb component",
Destination: &ServerConfig.ServiceLBNamespace,
Value: "kube-system",
},
&cli.StringFlag{
Name: "write-kubeconfig,o",
Usage: "(client) Write kubeconfig for admin client to this file",
Expand Down
1 change: 0 additions & 1 deletion pkg/daemons/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ type Control struct {
DisableETCD bool
DisableScheduler bool
Rootless bool
ServiceLBNamespace string
ExtraAPIArgs []string
ExtraControllerArgs []string
ExtraCloudControllerArgs []string
Expand Down
16 changes: 5 additions & 11 deletions pkg/daemons/control/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
"strings"
"time"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/xiaods/k8e/pkg/authenticator"
"github.com/xiaods/k8e/pkg/cluster"
"github.com/xiaods/k8e/pkg/daemons/config"
"github.com/xiaods/k8e/pkg/daemons/control/deps"
"github.com/xiaods/k8e/pkg/daemons/executor"
"github.com/xiaods/k8e/pkg/util"
"github.com/xiaods/k8e/pkg/version"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
authorizationv1 "k8s.io/api/authorization/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
logsapi "k8s.io/component-base/logs/api/v1"
Expand Down Expand Up @@ -79,7 +79,7 @@ func Server(ctx context.Context, cfg *config.Control) error {
}
}

if !cfg.DisableCCM || !cfg.DisableServiceLB {
if !cfg.DisableCCM {
if err := cloudControllerManager(ctx, cfg); err != nil {
return err
}
Expand Down Expand Up @@ -199,11 +199,8 @@ func apiServer(ctx context.Context, cfg *config.Control) error {
argsMap["kubelet-certificate-authority"] = runtime.ServerCA
argsMap["kubelet-client-certificate"] = runtime.ClientKubeAPICert
argsMap["kubelet-client-key"] = runtime.ClientKubeAPIKey
if cfg.FlannelExternalIP {
argsMap["kubelet-preferred-address-types"] = "ExternalIP,InternalIP,Hostname"
} else {
argsMap["kubelet-preferred-address-types"] = "InternalIP,ExternalIP,Hostname"
}
argsMap["kubelet-preferred-address-types"] = "InternalIP,ExternalIP,Hostname"

argsMap["requestheader-client-ca-file"] = runtime.RequestHeaderCA
argsMap["requestheader-allowed-names"] = deps.RequestHeaderCN
argsMap["proxy-client-cert-file"] = runtime.ClientAuthProxyCert
Expand Down Expand Up @@ -332,9 +329,6 @@ func cloudControllerManager(ctx context.Context, cfg *config.Control) error {
argsMap["controllers"] = argsMap["controllers"] + ",-cloud-node,-cloud-node-lifecycle"
argsMap["secure-port"] = "0"
}
if cfg.DisableServiceLB {
argsMap["controllers"] = argsMap["controllers"] + ",-service"
}
if cfg.VLevel != 0 {
argsMap["v"] = strconv.Itoa(cfg.VLevel)
}
Expand Down

0 comments on commit e1a0b52

Please sign in to comment.