Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Operator - Add feastProjectDir section to CR with git & init options #5079

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

tchughesiv
Copy link
Contributor

@tchughesiv tchughesiv commented Feb 20, 2025

What this PR does / why we need it:

Adds git and init capabilities to the Operator for feast project/repo directories. When used, the Operator will configure a FeatureStore Pod's initContainer to either clone the feast repo via git, or create a new feast project directory w/ the feast init command.

Which issue(s) this PR fixes:

Fixes #5078

Misc

Clone a git repo at a certain commit -

apiVersion: feast.dev/v1alpha1
kind: FeatureStore
metadata:
  name: sample-git
spec:
  feastProject: credit_scoring_local
  feastProjectDir:
    git:
      url: https://github.com/feast-dev/feast-credit-score-local-tutorial
      ref: 598a270

Clone a private git repo w/ an access token -

kind: Secret
apiVersion: v1
metadata:
  name: git-token
stringData:
  TOKEN: xxxxxxxxxxx
---
apiVersion: feast.dev/v1alpha1
kind: FeatureStore
metadata:
  name: sample-git-token
spec:
  feastProject: private
  feastProjectDir:
    git:
      configs:
        'url."https://api:${TOKEN}@github.com/".insteadOf': 'https://github.com/'
      envFrom:
        - secretRef:
            name: git-token
      url: 'https://github.com/user/private'

Initialize a new project directory w/ the spark template -

apiVersion: feast.dev/v1alpha1
kind: FeatureStore
metadata:
  name: sample-init
spec:
  feastProject: sample_init
  feastProjectDir:
    init:
      template: spark

@tchughesiv tchughesiv changed the title feast: Operator - Add feastProjectDir section to CR with git & init options feat: Operator - Add feastProjectDir section to CR with git & init options Feb 20, 2025
FeastProject string `json:"feastProject"`
Services *FeatureStoreServices `json:"services,omitempty"`
AuthzConfig *AuthzConfig `json:"authz,omitempty"`
FeastProject string `json:"feastProject"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT ? moving FeastProject and FeastProjectDir under ProjectSettings struct ?

type ProjectSettings struct {
    FeastProject    string           `json:"feastProject"`
    FeastProjectDir *FeastProjectDir `json:"feastProjectDir,omitempty"`
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would be a breaking change... would break the CRD... even more-so because its a required field. it would also be a bit odd to have a required field that's another level down.

@tchughesiv tchughesiv marked this pull request as ready for review February 24, 2025 16:44
@tchughesiv tchughesiv requested a review from a team as a code owner February 24, 2025 16:44
@redhatHameed
Copy link
Contributor

@tchughesiv WDYT adding example of when name feature repo directory different then feature_repo

@tchughesiv
Copy link
Contributor Author

@redhatHameed agree... was actually just working on that

Signed-off-by: Tommy Hughes <tohughes@redhat.com>
Copy link
Contributor

@redhatHameed redhatHameed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchughesiv Thanks for adding this feature.

@tchughesiv tchughesiv merged commit d64f01e into feast-dev:master Feb 24, 2025
24 checks passed
@@ -216,6 +217,74 @@ var _ = Describe("FeatureStore Controller", func() {
Expect(err).NotTo(HaveOccurred())
Expect(controllerutil.HasControllerReference(svc)).To(BeTrue())
Expect(svc.Spec.Ports[0].TargetPort).To(Equal(intstr.FromInt(int(services.FeastServiceConstants[services.OnlineFeastType].TargetHttpPort))))

// change projectDir to use a git repo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test cover all the new options? the feast init parameters and github ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one tests the git options... the next one tests the init ones -

// change projectDir to use an init template

franciscojavierarceo pushed a commit that referenced this pull request Mar 10, 2025
# [0.47.0](v0.46.0...v0.47.0) (2025-03-10)

* feat!: Include PUBLIC_URL in defaultProjectListPromise URL in /ui ([2f0f7b3](2f0f7b3))

### Bug Fixes

* Add transformation_service_endpoit to support Go feature server. ([#5071](#5071)) ([5627d7c](5627d7c))
* Adding extra space on the VM to kind cluster to see if this solves the issue with memory not available with operator e2e tests. ([#5102](#5102)) ([e6e928c](e6e928c))
* Allow unencrypted Snowflake key ([#5097](#5097)) ([87a7c23](87a7c23))
* Cant add different type of list types ([#5118](#5118)) ([bebd7be](bebd7be))
* Fixing transformations on writes ([#5127](#5127)) ([95ac34a](95ac34a))
* Identify s3/remote uri path correctly ([#5076](#5076)) ([93becff](93becff))
* Increase available action VM storage and reduce dev feature-server image size ([#5112](#5112)) ([75f5a90](75f5a90))
* Move Feast to pyproject.toml instead of setup.py ([#5067](#5067)) ([4231274](4231274))
* Skip refresh if already in progress or if lock is already held ([#5068](#5068)) ([f3a24de](f3a24de))

### Features

* Add an OOTB Chat uI to the Feature Server to support RAG demo ([#5106](#5106)) ([40ea7a9](40ea7a9))
* Add Couchbase Columnar as an Offline Store ([#5025](#5025)) ([4373cbf](4373cbf))
* Add Feast Operator RBAC example with Kubernetes Authentication … ([#5077](#5077)) ([2179fbe](2179fbe))
* Added docling and pytorch as add on ([#5089](#5089)) ([135342b](135342b))
* Feast Operator example with Postgres in TLS mode. ([#5028](#5028)) ([2c46f6a](2c46f6a))
* Operator - Add feastProjectDir section to CR with git & init options ([#5079](#5079)) ([d64f01e](d64f01e))
* Override the udf name when provided as input to an on demand transformation ([#5094](#5094)) ([8a714bb](8a714bb))
* Set value_type of entity directly in from_proto ([#5092](#5092)) ([90e7498](90e7498))
* Updating retrieve online documents v2 to work for other fields for sq… ([#5082](#5082)) ([fc121c3](fc121c3))

### BREAKING CHANGES

* The PUBLIC_URL environment variable is now taken into account by default
when fetching the projects list. This is a breaking change only if all
these points apply:

1. You're using Feast UI as a module

2. You're serving the UI files from a non-root path via the PUBLIC_URL
   environment variable

3. You're serving the project list from the root path

4. You're not passing the `feastUIConfigs.projectListPromise` prop to
   the FeastUI component

In this case, you need to explicitly fetch the project list from the
root path via the `feastUIConfigs.projectListPromise` prop:

```diff
 const root = createRoot(document.getElementById("root")!);
 root.render(
   <React.StrictMode>
-    <FeastUI />
+    <FeastUI
+      feastUIConfigs={{
+        projectListPromise: fetch("/projects-list.json", {
+            headers: {
+              "Content-Type": "application/json",
+            },
+          }).then((res) => res.json())
+      }}
+    />
   </React.StrictMode>
 );
```

Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Operator should easily support custom feast project/repo code
3 participants