Skip to content

Commit

Permalink
bugfix for advertised address
Browse files Browse the repository at this point in the history
  • Loading branch information
EronWright committed Oct 7, 2024
1 parent d5d708c commit 2fb59f1
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions operator/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
_ "k8s.io/client-go/plugin/pkg/client/auth"
"sigs.k8s.io/controller-runtime/pkg/client"

sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"
Expand Down Expand Up @@ -153,7 +152,7 @@ func main() {
if programFSAdvAddr == "" {
programFSAdvAddr = determineAdvAddr(programFSAddr)
}
pHandler := newProgramHandler(mgr.GetClient(), programFSAdvAddr)
pHandler := pulumicontroller.NewProgramHandler(mgr.GetClient(), programFSAdvAddr)

if err = (&autocontroller.WorkspaceReconciler{
Client: mgr.GetClient(),
Expand Down Expand Up @@ -249,14 +248,6 @@ func (fs pFileserver) Start(ctx context.Context) error {
}
}

func newProgramHandler(k8sClient client.Client, advAddr string) *pulumicontroller.ProgramHandler {
if advAddr == "" {
advAddr = determineAdvAddr(advAddr)
}

return pulumicontroller.NewProgramHandler(k8sClient, advAddr)
}

func determineAdvAddr(addr string) string {
host, port, err := net.SplitHostPort(addr)
if err != nil {
Expand Down

0 comments on commit 2fb59f1

Please sign in to comment.