Skip to content

Commit

Permalink
fix: expose svc for sharding (#8808)
Browse files Browse the repository at this point in the history
  • Loading branch information
loomts authored Jan 15, 2025
1 parent 982672d commit 5be65e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/operations/expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func (e ExposeOpsHandler) Action(reqCtx intctrlutil.RequestCtx, cli client.Clien
for _, comp := range opsRes.Cluster.Spec.ComponentSpecs {
compMap[comp.Name] = comp
}

for _, shard := range opsRes.Cluster.Spec.Shardings {
compMap[shard.Name] = shard.Template
}
for _, expose := range exposeMap {
clusterCompSpecName := ""
compDef := ""
Expand All @@ -71,7 +73,8 @@ func (e ExposeOpsHandler) Action(reqCtx intctrlutil.RequestCtx, cli client.Clien
if !ok {
return fmt.Errorf("component spec not found: %s", expose.ComponentName)
}
clusterCompSpecName = clusterCompSpec.Name
// shardName or compName
clusterCompSpecName = expose.ComponentName
compDef = clusterCompSpec.ComponentDef
}

Expand Down

0 comments on commit 5be65e3

Please sign in to comment.