Skip to content

Commit

Permalink
operator: improve service probes and grpc initContainer w authz header
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <[email protected]>
  • Loading branch information
tchughesiv committed Dec 12, 2024
1 parent cd91dce commit 8af0963
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions infra/feast-operator/internal/controller/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8af0963

Please sign in to comment.