Skip to content

Commit

Permalink
start: Configure proxy as early as possible
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cfergeau authored and anjannath committed Feb 21, 2023
1 parent 2932189 commit 6fef623
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, errors.Wrap(err, "Error waiting for apiserver")
}

if err := ensureProxyIsConfiguredInOpenShift(ctx, ocConfig, sshRunner, proxyConfig); err != nil {
return nil, errors.Wrap(err, "Failed to update cluster proxy configuration")
}

if err := cluster.DeleteMCOLeaderLease(ctx, ocConfig); err != nil {
return nil, err
}
Expand All @@ -516,10 +520,6 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
return nil, errors.Wrap(err, "Failed to update pull secret on the disk")
}

if err := ensureProxyIsConfiguredInOpenShift(ctx, ocConfig, sshRunner, proxyConfig); err != nil {
return nil, errors.Wrap(err, "Failed to update cluster proxy configuration")
}

if err := cluster.UpdateKubeAdminUserPassword(ctx, ocConfig, startConfig.KubeAdminPassword); err != nil {
return nil, errors.Wrap(err, "Failed to update kubeadmin user password")
}
Expand Down

0 comments on commit 6fef623

Please sign in to comment.