Skip to content

Commit

Permalink
remove helper to start the routes controller pod
Browse files Browse the repository at this point in the history
this is done via a systemd service on the bundle
which automatically starts the routes controller
pod after the cluster is started
  • Loading branch information
anjannath committed Jan 16, 2025
1 parent cad6cb4 commit ea59159
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, err
}

if client.useVSock() {
if err := ensureRoutesControllerIsRunning(sshRunner, ocConfig); err != nil {
return nil, err
}
}
logging.Info("Adding microshift context to kubeconfig...")
if err := mergeKubeConfigFile(constants.KubeconfigFilePath); err != nil {
return nil, err
Expand Down Expand Up @@ -566,12 +561,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, errors.Wrap(err, "Failed to update cluster ID")
}

if client.useVSock() {
if err := ensureRoutesControllerIsRunning(sshRunner, ocConfig); err != nil {
return nil, err
}
}

if client.monitoringEnabled() {
logging.Info("Enabling cluster monitoring operator...")
if err := cluster.StartMonitoring(ocConfig); err != nil {
Expand Down Expand Up @@ -808,17 +797,6 @@ func logBundleDate(crcBundleMetadata *bundle.CrcBundleInfo) {
}
}

func ensureRoutesControllerIsRunning(sshRunner *crcssh.Runner, ocConfig oc.Config) error {
// Check if the bundle have `/opt/crc/routes-controller.yaml` file and if it has
// then use it to create the resource for the routes controller.
_, _, err := sshRunner.Run("ls", "/opt/crc/routes-controller.yaml")
if err != nil {
return err
}
_, _, err = ocConfig.RunOcCommand("apply", "-f", "/opt/crc/routes-controller.yaml")
return err
}

func updateKubeconfig(ctx context.Context, ocConfig oc.Config, sshRunner *crcssh.Runner, kubeconfigFilePath string) error {
selfSignedCAKey, selfSignedCACert, err := crctls.GetSelfSignedCA()
if err != nil {
Expand Down

0 comments on commit ea59159

Please sign in to comment.