@@ -235,7 +235,7 @@ func (feast *FeastServices) deployFeastServiceByType(feastType FeastServiceType)
235235 // Delete REST API service if REST API is disabled
236236 _ = feast .Handler .DeleteOwnedFeastObj (& corev1.Service {
237237 ObjectMeta : metav1.ObjectMeta {
238- Name : feast .GetFeastServiceName (feastType ) + "-rest" ,
238+ Name : feast .GetFeastRestServiceName (feastType ),
239239 Namespace : feast .Handler .FeatureStore .Namespace ,
240240 },
241241 })
@@ -246,7 +246,7 @@ func (feast *FeastServices) deployFeastServiceByType(feastType FeastServiceType)
246246 // Delete REST API service if it exists
247247 _ = feast .Handler .DeleteOwnedFeastObj (& corev1.Service {
248248 ObjectMeta : metav1.ObjectMeta {
249- Name : feast .GetFeastServiceName (feastType ) + "-rest" ,
249+ Name : feast .GetFeastRestServiceName (feastType ),
250250 Namespace : feast .Handler .FeatureStore .Namespace ,
251251 },
252252 })
@@ -675,7 +675,7 @@ func (feast *FeastServices) createRestService() error {
675675
676676 svc := & corev1.Service {
677677 ObjectMeta : metav1.ObjectMeta {
678- Name : feast .GetFeastServiceName (feastType ) + "-rest" ,
678+ Name : feast .GetFeastRestServiceName (feastType ),
679679 Namespace : feast .Handler .FeatureStore .Namespace ,
680680 Labels : feast .getFeastTypeLabels (feastType ),
681681 },
@@ -834,7 +834,7 @@ func (feast *FeastServices) setServiceHostnames() error {
834834 getPortStr (feast .Handler .FeatureStore .Status .Applied .Services .Registry .Local .Server .TLS )
835835 if registry .Local .Server .RestAPI != nil && * registry .Local .Server .RestAPI {
836836 // Use the REST API service name
837- restSvcName := objMeta . Name + "-rest"
837+ restSvcName := feast . GetFeastRestServiceName ( RegistryFeastType )
838838 feast .Handler .FeatureStore .Status .ServiceHostnames .RegistryRest = restSvcName + "." + objMeta .Namespace + domain +
839839 getPortStr (feast .Handler .FeatureStore .Status .Applied .Services .Registry .Local .Server .TLS )
840840 }
@@ -1151,3 +1151,8 @@ func IsDeploymentAvailable(conditions []appsv1.DeploymentCondition) bool {
11511151
11521152 return false
11531153}
1154+
1155+ // GetFeastRestServiceName returns the feast REST service object name based on service type
1156+ func (feast * FeastServices ) GetFeastRestServiceName (feastType FeastServiceType ) string {
1157+ return feast .GetFeastServiceName (feastType ) + "-rest"
1158+ }
0 commit comments