move kubeconfig to dedicates step
mjudeikis opened this issue · 1 comments
mjudeikis commented
var adminInternalClient *kubeconfig.AdminInternalClient
err = pg.Get(&adminInternalClient)
if err != nil {
return err
}
aroServiceInternalClient, err := m.generateAROServiceKubeconfig(pg)
if err != nil {
return err
}
aroSREInternalClient, err := m.generateAROSREKubeconfig(pg)
if err != nil {
return err
}
aroUserInternalClient, err := m.generateUserAdminKubeconfig(pg)
if err != nil {
return err
}
m.doc, err = m.db.PatchWithLease(ctx, m.doc.Key, func(doc *api.OpenShiftClusterDocument) error {
// used for the SAS token with which the bootstrap node retrieves its
// ignition payload
var t time.Time
if doc.OpenShiftCluster.Properties.Install.Now == t {
// Only set this if it hasn't been set already, since it is used to
// create values for signedStart and signedExpiry in
// deployResourceTemplate, and if these are not stable a
// redeployment will fail.
doc.OpenShiftCluster.Properties.Install.Now = time.Now().UTC()
}
doc.OpenShiftCluster.Properties.AdminKubeconfig = adminInternalClient.File.Data
doc.OpenShiftCluster.Properties.AROServiceKubeconfig = aroServiceInternalClient.File.Data
doc.OpenShiftCluster.Properties.AROSREKubeconfig = aroSREInternalClient.File.Data
doc.OpenShiftCluster.Properties.UserAdminKubeconfig = aroUserInternalClient.File.Data
return nil
Should move out of attachNSGsAndPatch
.
Confusing.
rolandmkunkel commented
I will work on this. I can't assign myself for now