Skip to content

Commit

Permalink
Add spec.ordinal.start usage back to service_builder.go
Browse files Browse the repository at this point in the history
  • Loading branch information
vimystic committed Nov 20, 2024
1 parent 5905c9b commit 3b27cf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/fullnode/peer_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (c PeerCollector) Collect(ctx context.Context, crd *cosmosv1.CosmosFullNode
if crd.Spec.Service.ClusterDomain != nil {
clusterDomain = *crd.Spec.Service.ClusterDomain
}
for i := crd.Spec.Ordinal.Start; i < crd.Spec.Ordinal.Start+crd.Spec.Replicas; i++ {
for i := int32(0); i < crd.Spec.Replicas; i++ {
secretName := nodeKeySecretName(crd, i)
var secret corev1.Secret
// Hoping the caching layer kubebuilder prevents API errors or rate limits. Simplifies logic to use a Get here
Expand Down
2 changes: 1 addition & 1 deletion internal/fullnode/service_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func BuildServices(crd *cosmosv1.CosmosFullNode) []diff.Resource[*corev1.Service
maxExternal := lo.Clamp(max, 0, crd.Spec.Replicas)
p2ps := make([]diff.Resource[*corev1.Service], crd.Spec.Replicas)

for i := int32(0); i < crd.Spec.Replicas; i++ {
for i := crd.Spec.Ordinal.Start; i < crd.Spec.Ordinal.Start+crd.Spec.Replicas; i++ {
ordinal := i
var svc corev1.Service
svc.Name = p2pServiceName(crd, ordinal)
Expand Down

0 comments on commit 3b27cf1

Please sign in to comment.