GeezerVison is showing github.com — fix(operator): Only deploy an online store when it is declared by nikolauspschuetz · Pull Request #6591 · feast-dev/feast
Conversation
Closes #6586.
Problem
The Feast operator always deployed an online store service (including a serving pod), even when the FeatureStore CR did not declare spec.services.onlineStore. This makes it impossible to run a standalone registry or offline store (e.g. the documented federated / shared-registry pattern), and is inconsistent with how registry and offlineStore behave — both are only defaulted when declared.
Cause
In ApplyDefaultsToStatus (infra/feast-operator/internal/controller/services/util.go), the online-store block force-created the service when nil:
if services.OnlineStore == nil {
services.OnlineStore = &feastdevv1.OnlineStore{}
}
// ...defaults always applied...
whereas registry and offlineStore are gated behind if services.X != nil.
Fix
Gate the online-store defaulting behind services.OnlineStore != nil, mirroring the two sibling services. A declared online store still receives all of its defaults (persistence, path, PVC, server, container configs).
Tests
Added util_test.go with two specs for ApplyDefaultsToStatus:
- a CR without an online store →
Status.Applied.Services.OnlineStore stays nil (fails on master, passes with this change),
- a CR that declares an online store → it still receives its defaults.
Verified with KUBEBUILDER_ASSETS=... go test ./internal/controller/services/ (envtest 1.31.0); go build ./..., go vet, and gofmt are clean. The existing controller tests are unaffected because they declare onlineStore explicitly.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
nikolauspschuetz
changed the title
fix(operator): only deploy an online store when it is declared
fix(operator): Only deploy an online store when it is declared
Jul 9, 2026
|
The red `unit-test-python (3.11, macos-14)` leg is an unrelated CI flake, not caused by this change (which is Go-only, scoped to `infra/feast-operator/`):
```
ERROR sdk/python/tests/unit/test_feature_server.py::test_push_and_get
AssertionError: stdout: b''
stderr: b"Command timed out after 120s: [\x27apply\x27]"
2259 passed, 47 skipped, 1 error
```
A `feast apply` subprocess timed out after 120s on the macOS-14 runner. The macOS-3.12 leg and all Ubuntu legs (3.10/3.11/3.12) passed on this same commit, and `operator-test` is green. I do not have permission to re-run the job from the fork — a maintainer re-run of that single leg should clear it.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Feast Kubernetes operator’s defaulting logic so an online store service is only deployed when spec.services.onlineStore is explicitly declared, matching the existing behavior for registry and offlineStore. This enables FeatureStore deployments that intentionally omit the online store (e.g., registry-only / offline-only patterns).
Changes:
- Gate online-store defaulting in
ApplyDefaultsToStatus behind services.OnlineStore != nil to avoid implicitly creating/deploying an online store.
- Add unit tests covering both “onlineStore omitted” and “onlineStore declared” behaviors.
- Update existing controller/service tests to explicitly declare
onlineStore where those tests still require an online store to exist.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File |
Description |
| infra/feast-operator/internal/controller/services/util.go |
Stop implicitly creating online-store defaults unless the online store is declared. |
| infra/feast-operator/internal/controller/services/util_test.go |
Add regression/unit tests for online-store defaulting behavior. |
| infra/feast-operator/internal/controller/services/tls_test.go |
Explicitly declare onlineStore so TLS defaulting assertions remain valid. |
| infra/feast-operator/internal/controller/services/repo_config_test.go |
Adjust expectations/helpers to reflect that online store is no longer implicit. |
| infra/feast-operator/internal/controller/featurestore_controller_test.go |
Ensure test FeatureStores declare onlineStore where required for validity. |
| infra/feast-operator/internal/controller/featurestore_controller_loglevel_test.go |
Explicitly include onlineStore in the test services spec. |
| infra/feast-operator/internal/controller/featurestore_controller_cronjob_test.go |
Ensure test FeatureStores declare onlineStore where required for validity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+166
to
+170
|
|
// Only apply online store defaults when the online store is declared, so a
|
|
|
// FeatureStore can omit spec.services.onlineStore (mirroring registry and
|
|
|
// offlineStore) and not have an online store deployed. (#6586)
|
|
|
if services.OnlineStore != nil {
|
|
|
if services.OnlineStore.Persistence == nil {
|
|
@nikolauspschuetz instead I think fix should be to allow online server deployment to opt-out.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @ntkathole — that makes sense for backward compatibility. Omitting onlineStore today implicitly deploys one, so flipping that default (what this PR currently does) is a breaking change on upgrade for anyone relying on the implicit default.
To make it opt-out instead, I'd keep the current default-on behavior and add an explicit disable switch on the online store spec, mirroring the existing DisableInitContainers idiom already in the CRD:
type OnlineStore struct {
// Disabled skips deploying the online store service.
// +optional
Disabled bool `json:"disabled,omitempty"`
Server *ServerConfigs `json:"server,omitempty"`
Persistence *OnlineStorePersistence `json:"persistence,omitempty"`
// ...
}
ApplyDefaultsToStatus would skip the onlineStore defaulting/deployment when disabled is true; omitting the block keeps deploying it exactly as before. The standalone-registry / federated pattern from #6586 would then be expressed explicitly as spec.services.onlineStore.disabled: true.
One clarification so I build the right thing: do you want the opt-out at the whole online-store level (skip both persistence and the serving pod), or only the online server (serving pod), keeping the online store config? Happy to rework the PR either way once you confirm.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
opt-out at the whole online-store level (skip both persistence and the serving pod), or only the online server (serving pod), keeping the online store config?
opt-out at the whole onlineStore level (disabled: true), not server-only.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks — reworked it to opt-out. The default is back to deploying the online store, so nothing changes on upgrade for existing setups. Setting spec.services.onlineStore.disabled: true now skips it entirely (serving pod and persistence), which covers the registry-only / offline-only case from #6586. It's gated through isOnlineStore(), so metrics and the service monitor drop off with it too.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Rebased onto master and resolved the conflict, @ntkathole. The only conflict was in .secrets.baseline (a shifted line_number and the generated_at timestamp — my disabled field pushed the tracked line in featurestore_types.go from 937 to 941); the operator code merged cleanly.
Ran the operator suite locally against the envtest harness (k8s 1.31.0) after the rebase — internal/controller/services passes, including the isOnlineStore / disabled: true cases in util_test.go. Ready for another look.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
⚠️ Please install the to ensure uploads and comments are reliably processed by Codecov.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.35%. Comparing base (0f149a9) to head (a5466a5).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

@@ Coverage Diff @@
## master #6591 +/- ##
=======================================
Coverage 46.35% 46.35%
=======================================
Files 414 414
Lines 50052 50052
Branches 7151 7151
=======================================
Hits 23201 23201
Misses 25229 25229
Partials 1622 1622
Continue to review full report in Codecov by Harness.
Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f149a9...a5466a5. Read the comment docs.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
nikolauspschuetz reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…he online store
The operator always deploys an online store, forcing a serving pod and
persistence onto registry-only or offline-only FeatureStores (feast-dev#6586). Add a
`disabled` field on the online store spec to opt those deployments out
explicitly. Deployment is gated through isOnlineStore(), so disabling also
skips the serving pod, metrics, and service monitor. The default is unchanged
-- omitting the online store block still deploys it with defaults -- so this
is not a breaking change on upgrade.
Signed-off-by: Nikolaus Schuetz <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|