@@ -427,11 +427,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
427427 return nil , errors .Wrap (err , "Error updating public key" )
428428 }
429429
430- // Trigger disk resize, this will be a no-op if no disk size change is needed
431- if err := growRootFileSystem (sshRunner , startConfig .Preset , startConfig .PersistentVolumeSize ); err != nil {
432- return nil , errors .Wrap (err , "Error updating filesystem size" )
433- }
434-
435430 // Start network time synchronization if `CRC_DEBUG_ENABLE_STOP_NTP` is not set
436431 if stopNtp , _ := strconv .ParseBool (os .Getenv ("CRC_DEBUG_ENABLE_STOP_NTP" )); stopNtp {
437432 logging .Info ("Stopping network time synchronization in CRC VM" )
@@ -542,6 +537,15 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
542537 return nil , errors .Wrap (err , "Failed to check certificate validity" )
543538 }
544539
540+ // copy the pull secret into /opt/crc/pull-secret in the instance
541+ pullSecret , err := startConfig .PullSecret .Value ()
542+ if err != nil {
543+ return nil , err
544+ }
545+ if err := sshRunner .CopyDataPrivileged ([]byte (pullSecret ), "/opt/crc/pull-secret" , 0600 ); err != nil {
546+ return nil , errors .Wrap (err , "Unable to send pull-secret to instance" )
547+ }
548+
545549 logging .Info ("Starting kubelet service" )
546550 sd := systemd .NewInstanceSystemdCommander (sshRunner )
547551 if err := sd .Start ("kubelet" ); err != nil {
@@ -567,10 +571,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
567571 return nil , err
568572 }
569573
570- if err := cluster .EnsurePullSecretPresentInTheCluster (ctx , ocConfig , startConfig .PullSecret ); err != nil {
571- return nil , errors .Wrap (err , "Failed to update cluster pull secret" )
572- }
573-
574574 if err := cluster .EnsureSSHKeyPresentInTheCluster (ctx , ocConfig , constants .GetPublicKeyPath ()); err != nil {
575575 return nil , errors .Wrap (err , "Failed to update ssh public key to machine config" )
576576 }
@@ -579,20 +579,10 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
579579 return nil , errors .Wrap (err , "Failed to update pull secret on the disk" )
580580 }
581581
582- if err := cluster .UpdateKubeAdminUserPassword (ctx , ocConfig , startConfig .KubeAdminPassword ); err != nil {
582+ if err := cluster .UpdateKubeAdminUserPassword (ctx , sshRunner , startConfig .KubeAdminPassword ); err != nil {
583583 return nil , errors .Wrap (err , "Failed to update kubeadmin user password" )
584584 }
585585
586- if err := cluster .EnsureClusterIDIsNotEmpty (ctx , ocConfig ); err != nil {
587- return nil , errors .Wrap (err , "Failed to update cluster ID" )
588- }
589-
590- if client .useVSock () {
591- if err := ensureRoutesControllerIsRunning (sshRunner , ocConfig ); err != nil {
592- return nil , err
593- }
594- }
595-
596586 if client .monitoringEnabled () {
597587 logging .Info ("Enabling cluster monitoring operator..." )
598588 if err := cluster .StartMonitoring (ocConfig ); err != nil {
0 commit comments