Skip to content

Commit 6fef623

Browse files
cfergeauanjannath
authored andcommitted
start: Configure proxy as early as possible
The machine-config operator tries to do some remote registry checks when it starts, so it's better to set the cluster proxy settings as early as possible after starting the kubelet.
1 parent 2932189 commit 6fef623

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/crc/machine/start.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
500500
return nil, errors.Wrap(err, "Error waiting for apiserver")
501501
}
502502

503+
if err := ensureProxyIsConfiguredInOpenShift(ctx, ocConfig, sshRunner, proxyConfig); err != nil {
504+
return nil, errors.Wrap(err, "Failed to update cluster proxy configuration")
505+
}
506+
503507
if err := cluster.DeleteMCOLeaderLease(ctx, ocConfig); err != nil {
504508
return nil, err
505509
}
@@ -516,10 +520,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
516520
return nil, errors.Wrap(err, "Failed to update pull secret on the disk")
517521
}
518522

519-
if err := ensureProxyIsConfiguredInOpenShift(ctx, ocConfig, sshRunner, proxyConfig); err != nil {
520-
return nil, errors.Wrap(err, "Failed to update cluster proxy configuration")
521-
}
522-
523523
if err := cluster.UpdateKubeAdminUserPassword(ctx, ocConfig, startConfig.KubeAdminPassword); err != nil {
524524
return nil, errors.Wrap(err, "Failed to update kubeadmin user password")
525525
}

0 commit comments

Comments
 (0)