diff --git a/pkg/models/openpitrix/types.go b/pkg/models/openpitrix/types.go index 31e9c2864..3ccddcb65 100644 --- a/pkg/models/openpitrix/types.go +++ b/pkg/models/openpitrix/types.go @@ -713,7 +713,7 @@ type Repo struct { // selectors Selectors RepoSelectors `json:"selectors"` - // status eg.[active|deleted] + // status eg.[successful|failed|syncing] Status string `json:"status,omitempty"` // record status changed time diff --git a/pkg/models/openpitrix/utils.go b/pkg/models/openpitrix/utils.go index ec6be1286..2a12a08a2 100644 --- a/pkg/models/openpitrix/utils.go +++ b/pkg/models/openpitrix/utils.go @@ -429,6 +429,10 @@ func convertRepo(in *v1alpha1.HelmRepo) *Repo { out.Name = in.GetTrueName() out.Status = in.Status.State + // set default status `syncing` when helmrepo not reconcile yet + if out.Status == "" { + out.Status = v1alpha1.RepoStateSyncing + } date := strfmt.DateTime(time.Unix(in.CreationTimestamp.Unix(), 0)) out.CreateTime = &date