Skip to content

Commit 6847193

Browse files
committed
also set --grpc-public-host
1 parent 50f3618 commit 6847193

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

internal/resources/database_statefulset.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ func (b *DatabaseStatefulSetBuilder) buildContainerArgs() ([]string, []string) {
632632
}
633633
}
634634

635+
publicHostOption := "--grpc-public-host"
635636
publicHost := fmt.Sprintf(api.InterconnectServiceFQDNFormat, b.Database.Name, b.GetNamespace()) // FIXME .svc.cluster.local
636637

637638
if b.Spec.Service.GRPC.ExternalHost != "" {
@@ -657,20 +658,17 @@ func (b *DatabaseStatefulSetBuilder) buildContainerArgs() ([]string, []string) {
657658
ipFamilyArg,
658659
"$(POD_IP)",
659660
)
660-
} else {
661-
publicHostOption := "--grpc-public-host"
662-
args = append(
663-
args,
664-
publicHostOption,
665-
fmt.Sprintf("%s.%s", "$(NODE_NAME)", publicHost), // fixme $(NODE_NAME)
666-
)
667661
}
668662

669663
publicPortOption := "--grpc-public-port"
670664
publicPort := api.GRPCPort
671665

672666
args = append(
673667
args,
668+
669+
publicHostOption,
670+
fmt.Sprintf("%s.%s", "$(NODE_NAME)", publicHost), // fixme $(NODE_NAME)
671+
674672
publicPortOption,
675673
strconv.Itoa(publicPort),
676674
)

0 commit comments

Comments
 (0)