Skip to content

Commit

Permalink
fix port conflict when running controller manager
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Aug 6, 2021
1 parent e842b6e commit bd30320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func Start(ctx context.Context, slug string, dataDir string) error {

// start the controller manager on port 11252 (non standard)
// TODO the controller should start
// if err := runController(ctx, dataDir); err != nil {
// return errors.Wrap(err, "start controller")
// }
if err := runController(ctx, dataDir); err != nil {
return errors.Wrap(err, "start controller")
}

// because these are all synchoronous, the api is ready and we
// can install our addons
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import (
"crypto/tls"
"fmt"
"net/http"
"sync"
"time"

"github.com/pkg/errors"
"github.com/replicatedhq/kots/pkg/logger"
"k8s.io/kubernetes/cmd/kube-controller-manager/app"
)

func runController(ctx context.Context, wg *sync.WaitGroup, dataDir string) error {
func runController(ctx context.Context, dataDir string) error {
log := ctx.Value("log").(*logger.CLILogger)
log.Info("starting kubernetes controller manager")

Expand All @@ -38,6 +37,7 @@ func runController(ctx context.Context, wg *sync.WaitGroup, dataDir string) erro
args := []string{
"--bind-address=0.0.0.0",
"--secure-port=11252",
"--port=0", // Don't serve insecure
"--cluster-cidr=10.200.0.0/16",
"--cluster-name=kubernetes",
fmt.Sprintf("--cluster-signing-cert-file=%s", caCertFile),
Expand Down

0 comments on commit bd30320

Please sign in to comment.