Skip to content

Commit

Permalink
Merge pull request #11073 from MUzairS15/MUzairS15/fix/registrant
Browse files Browse the repository at this point in the history
[Server] Remove hardcoded `registrant/host`
  • Loading branch information
leecalcote committed May 31, 2024
2 parents bacc546 + 63478b2 commit 12957ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/meshmodel/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ func (erh *EntityRegistrationHelper) watchComponents(ctx context.Context) {
select {
case comp := <-erh.componentChan:
err = erh.regManager.RegisterEntity(v1beta1.Host{
Hostname: ArtifactHubComponentsHandler.String(),
Hostname: comp.Model.Registrant.Hostname,
}, &comp)
if err != nil {
err = core.ErrRegisterEntity(err, string(comp.Type()), comp.DisplayName)
}
case rel := <-erh.relationshipChan:
err = erh.regManager.RegisterEntity(v1beta1.Host{
Hostname: ArtifactHubComponentsHandler.String(),
Hostname: rel.Model.Registrant.Hostname,
}, &rel)
if err != nil {
err = core.ErrRegisterEntity(err, string(rel.Type()), rel.Kind)
Expand Down

0 comments on commit 12957ca

Please sign in to comment.