@@ -427,11 +427,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
427
427
return nil , errors .Wrap (err , "Error updating public key" )
428
428
}
429
429
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
-
435
430
// Start network time synchronization if `CRC_DEBUG_ENABLE_STOP_NTP` is not set
436
431
if stopNtp , _ := strconv .ParseBool (os .Getenv ("CRC_DEBUG_ENABLE_STOP_NTP" )); stopNtp {
437
432
logging .Info ("Stopping network time synchronization in CRC VM" )
@@ -542,6 +537,15 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
542
537
return nil , errors .Wrap (err , "Failed to check certificate validity" )
543
538
}
544
539
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
+
545
549
logging .Info ("Starting kubelet service" )
546
550
sd := systemd .NewInstanceSystemdCommander (sshRunner )
547
551
if err := sd .Start ("kubelet" ); err != nil {
@@ -567,10 +571,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
567
571
return nil , err
568
572
}
569
573
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
-
574
574
if err := cluster .EnsureSSHKeyPresentInTheCluster (ctx , ocConfig , constants .GetPublicKeyPath ()); err != nil {
575
575
return nil , errors .Wrap (err , "Failed to update ssh public key to machine config" )
576
576
}
@@ -579,20 +579,10 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
579
579
return nil , errors .Wrap (err , "Failed to update pull secret on the disk" )
580
580
}
581
581
582
- if err := cluster .UpdateKubeAdminUserPassword (ctx , ocConfig , startConfig .KubeAdminPassword ); err != nil {
582
+ if err := cluster .UpdateKubeAdminUserPassword (ctx , sshRunner , startConfig .KubeAdminPassword ); err != nil {
583
583
return nil , errors .Wrap (err , "Failed to update kubeadmin user password" )
584
584
}
585
585
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
-
596
586
if client .monitoringEnabled () {
597
587
logging .Info ("Enabling cluster monitoring operator..." )
598
588
if err := cluster .StartMonitoring (ocConfig ); err != nil {
0 commit comments