diff --git a/infra/feast-operator/internal/controller/services/services.go b/infra/feast-operator/internal/controller/services/services.go index a3cc5b1a3af..bcae191d40a 100644 --- a/infra/feast-operator/internal/controller/services/services.go +++ b/infra/feast-operator/internal/controller/services/services.go @@ -402,7 +402,8 @@ func (feast *FeastServices) registryClientPodConfigs(podSpec *corev1.PodSpec) { func (feast *FeastServices) setRegistryClientInitContainer(podSpec *corev1.PodSpec) { hostname := feast.Handler.FeatureStore.Status.ServiceHostnames.Registry - if len(hostname) > 0 { + // add grpc init container if registry is not configured via 'remote.hostname' + if len(hostname) > 0 && !feast.isRemoteHostnameRegistry() { grpcurlFlag := "-plaintext" hostSplit := strings.Split(hostname, ":") if len(hostSplit) > 1 && hostSplit[1] == "443" { @@ -635,19 +636,13 @@ func (feast *FeastServices) isRemoteRegistry() bool { } func (feast *FeastServices) IsRemoteRefRegistry() bool { - if feast.isRemoteRegistry() { - remote := feast.Handler.FeatureStore.Status.Applied.Services.Registry.Remote - return remote != nil && remote.FeastRef != nil - } - return false + return feast.isRemoteRegistry() && + feast.Handler.FeatureStore.Status.Applied.Services.Registry.Remote.FeastRef != nil } func (feast *FeastServices) isRemoteHostnameRegistry() bool { - if feast.isRemoteRegistry() { - remote := feast.Handler.FeatureStore.Status.Applied.Services.Registry.Remote - return remote != nil && remote.Hostname != nil - } - return false + return feast.isRemoteRegistry() && + feast.Handler.FeatureStore.Status.Applied.Services.Registry.Remote.Hostname != nil } func (feast *FeastServices) isOfflinStore() bool {