diff --git a/infra/feast-operator/config/default/kustomization.yaml b/infra/feast-operator/config/default/kustomization.yaml index b494dc123b..ca57315424 100644 --- a/infra/feast-operator/config/default/kustomization.yaml +++ b/infra/feast-operator/config/default/kustomization.yaml @@ -33,9 +33,6 @@ patches: - path: related_image_fs_patch.yaml target: kind: Deployment -- path: related_image_grpc_patch.yaml - target: - kind: Deployment # Uncomment the patches line if you enable Metrics, and/or are using webhooks and cert-manager # [METRICS] The following patch will enable the metrics endpoint using HTTPS and the port :8443. # More info: https://book.kubebuilder.io/reference/metrics diff --git a/infra/feast-operator/config/default/related_image_grpc_patch.yaml b/infra/feast-operator/config/default/related_image_grpc_patch.yaml deleted file mode 100644 index 5c23ece2f0..0000000000 --- a/infra/feast-operator/config/default/related_image_grpc_patch.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- op: replace - path: "/spec/template/spec/containers/0/env/1" - value: - name: RELATED_IMAGE_GRPC_CURL - value: docker.io/fullstorydev/grpcurl:v1.9.1-alpine diff --git a/infra/feast-operator/config/manager/manager.yaml b/infra/feast-operator/config/manager/manager.yaml index 4259cf8a7e..e7550f0db7 100644 --- a/infra/feast-operator/config/manager/manager.yaml +++ b/infra/feast-operator/config/manager/manager.yaml @@ -73,8 +73,6 @@ spec: env: - name: RELATED_IMAGE_FEATURE_SERVER value: feast:latest - - name: RELATED_IMAGE_GRPC_CURL - value: grpc:latest livenessProbe: httpGet: path: /healthz diff --git a/infra/feast-operator/dist/install.yaml b/infra/feast-operator/dist/install.yaml index 2bc6bc8e2d..6c89150c08 100644 --- a/infra/feast-operator/dist/install.yaml +++ b/infra/feast-operator/dist/install.yaml @@ -4184,8 +4184,6 @@ spec: env: - name: RELATED_IMAGE_FEATURE_SERVER value: docker.io/feastdev/feature-server:0.43.0 - - name: RELATED_IMAGE_GRPC_CURL - value: docker.io/fullstorydev/grpcurl:v1.9.1-alpine image: feastdev/feast-operator:0.43.0 livenessProbe: httpGet: diff --git a/infra/feast-operator/go.mod b/infra/feast-operator/go.mod index edfb599f52..c8608cb242 100644 --- a/infra/feast-operator/go.mod +++ b/infra/feast-operator/go.mod @@ -5,6 +5,7 @@ go 1.22.9 require ( github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.32.0 + github.com/openshift/api v0.0.0-20240912201240-0a8800162826 // release-4.17 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.30.1 k8s.io/apimachinery v0.30.1 @@ -48,7 +49,6 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/openshift/api v0.0.0-20240912201240-0a8800162826 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.18.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect diff --git a/infra/feast-operator/internal/controller/featurestore_controller_test.go b/infra/feast-operator/internal/controller/featurestore_controller_test.go index 9accea89ed..152bd0b18f 100644 --- a/infra/feast-operator/internal/controller/featurestore_controller_test.go +++ b/infra/feast-operator/internal/controller/featurestore_controller_test.go @@ -1021,7 +1021,7 @@ var _ = Describe("FeatureStore Controller", func() { Namespace: objMeta.Namespace, }, deploy) Expect(err).NotTo(HaveOccurred()) - Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(2)) + Expect(deploy.Spec.Template.Spec.InitContainers).To(HaveLen(1)) // check client config cm := &corev1.ConfigMap{} diff --git a/infra/feast-operator/internal/controller/services/services.go b/infra/feast-operator/internal/controller/services/services.go index 9dd98fa9f6..5a2ed7aa4e 100644 --- a/infra/feast-operator/internal/controller/services/services.go +++ b/infra/feast-operator/internal/controller/services/services.go @@ -52,7 +52,7 @@ func (feast *FeastServices) ApplyDefaults() error { // Deploy the feast services func (feast *FeastServices) Deploy() error { if feast.noLocalServiceConfigured() { - return errors.New("At least one local service must be configured. e.g. registry / online / offline.") + return errors.New("at least one local service must be configured. e.g. registry / online / offline") } openshiftTls, err := feast.checkOpenshiftTls() if err != nil { @@ -349,7 +349,6 @@ func (feast *FeastServices) setPod(podSpec *corev1.PodSpec) error { if err := feast.setContainers(podSpec); err != nil { return err } - feast.setRegistryClientInitContainer(podSpec) feast.mountTlsConfigs(podSpec) feast.mountPvcConfigs(podSpec) feast.mountEmptyDirVolumes(podSpec) @@ -506,29 +505,6 @@ func (feast *FeastServices) setInitContainer(podSpec *corev1.PodSpec, fsYamlB64 } } -// add grpc init container if remote registry reference (feastRef) is configured -func (feast *FeastServices) setRegistryClientInitContainer(podSpec *corev1.PodSpec) { - if !feast.Handler.FeatureStore.Status.Applied.Services.DisableInitContainers { - hostname := feast.Handler.FeatureStore.Status.ServiceHostnames.Registry - if len(hostname) > 0 && feast.IsRemoteRefRegistry() { - grpcurlFlag := "-plaintext" - hostSplit := strings.Split(hostname, ":") - if len(hostSplit) > 1 && hostSplit[1] == "443" { - grpcurlFlag = "-insecure" - } - podSpec.InitContainers = append(podSpec.InitContainers, corev1.Container{ - Name: "init-registry", - Image: getGrpcCurlImage(), - Command: []string{ - "sh", "-c", - "until grpcurl -H \"authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)\" " + - grpcurlFlag + " -d '' -format text " + hostname + " grpc.health.v1.Health/Check; do echo waiting for registry; sleep 2; done", - }, - }) - } - } -} - func (feast *FeastServices) setService(svc *corev1.Service, feastType FeastServiceType) error { svc.Labels = feast.getFeastTypeLabels(feastType) if feast.isOpenShiftTls(feastType) { diff --git a/infra/feast-operator/internal/controller/services/services_types.go b/infra/feast-operator/internal/controller/services/services_types.go index 09f38dc45c..32ff95588a 100644 --- a/infra/feast-operator/internal/controller/services/services_types.go +++ b/infra/feast-operator/internal/controller/services/services_types.go @@ -25,11 +25,8 @@ import ( ) const ( - feastServerImageVar = "RELATED_IMAGE_FEATURE_SERVER" - grpcCurlImageVar = "RELATED_IMAGE_GRPC_CURL" - grpcCurlImage = "fullstorydev/grpcurl:v1.9.1-alpine" - TmpFeatureStoreYamlEnvVar = "TMP_FEATURE_STORE_YAML_BASE64" + feastServerImageVar = "RELATED_IMAGE_FEATURE_SERVER" FeatureStoreYamlCmKey = "feature_store.yaml" EphemeralPath = "/feast-data" FeatureRepoDir = "/feature_repo" diff --git a/infra/feast-operator/internal/controller/services/util.go b/infra/feast-operator/internal/controller/services/util.go index e17e634da4..84218c47fd 100644 --- a/infra/feast-operator/internal/controller/services/util.go +++ b/infra/feast-operator/internal/controller/services/util.go @@ -11,7 +11,6 @@ import ( feastdevv1alpha1 "github.com/feast-dev/feast/infra/feast-operator/api/v1alpha1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -182,13 +181,6 @@ func getFeatureServerImage() string { return DefaultImage } -func getGrpcCurlImage() string { - if img, exists := os.LookupEnv(grpcCurlImageVar); exists { - return img - } - return grpcCurlImage -} - func checkOfflineStoreFilePersistenceType(value string) error { if slices.Contains(feastdevv1alpha1.ValidOfflineStoreFilePersistenceTypes, value) { return nil @@ -196,12 +188,12 @@ func checkOfflineStoreFilePersistenceType(value string) error { return fmt.Errorf("invalid file type %s for offline store", value) } -func ensureRequestedStorage(resources *v1.VolumeResourceRequirements, requestedStorage string) { +func ensureRequestedStorage(resources *corev1.VolumeResourceRequirements, requestedStorage string) { if resources.Requests == nil { - resources.Requests = v1.ResourceList{} + resources.Requests = corev1.ResourceList{} } - if _, ok := resources.Requests[v1.ResourceStorage]; !ok { - resources.Requests[v1.ResourceStorage] = resource.MustParse(requestedStorage) + if _, ok := resources.Requests[corev1.ResourceStorage]; !ok { + resources.Requests[corev1.ResourceStorage] = resource.MustParse(requestedStorage) } }