From ea59159e00bd042d6c6c81f49abc2c1ff567296a Mon Sep 17 00:00:00 2001 From: Anjan Nath Date: Wed, 15 Jan 2025 13:08:05 +0530 Subject: [PATCH] remove helper to start the routes controller pod this is done via a systemd service on the bundle which automatically starts the routes controller pod after the cluster is started --- pkg/crc/machine/start.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pkg/crc/machine/start.go b/pkg/crc/machine/start.go index c6f5a5eda6..b46122e6f4 100644 --- a/pkg/crc/machine/start.go +++ b/pkg/crc/machine/start.go @@ -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 @@ -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 { @@ -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 {