Skip to content

feat: Add commandPrefix to wrap Feast server commands - #7023

Open
dbbvitor wants to merge 11 commits into
feast-dev:masterfrom
dbbvitor:feat/operator-command-prefix
Open

dbbvitor wants to merge 11 commits into
feast-dev:masterfrom
dbbvitor:feat/operator-command-prefix

Conversation

@dbbvitor

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds ServerConfigs.CommandPrefix (new field, next to the existing DualStack in the same struct), prepended to the operator-generated server command (online/offline/registry/UI servers and the lineage server), so users can wrap the Feast server with tools such as opentelemetry-instrument or a profiler. This deliberately diverges from the issue's original ask for a verbatim command/args override: a verbatim override would force users to copy every flag the operator computes (port, TLS, workers, metrics, --registry_ttl_sec, ...), and those copies silently rot as the operator
evolves, we hit exactly this with a Kyverno-based command-wrapping workaround we run internally, which silently dropped --workers/--metrics once the operator started setting them. With a prefix, the operator keeps owning the argv, confirmed by reading getContainerCommand(): every computed flag is appended before the final return withCommandPrefix(feastCommand, ...) call, so the prefix can never clobber a flag.

Validated end-to-end by wrapping the online server's command with opentelemetry-instrument via this field, in place of a Dockerfile-level binary-rename shim we use for the same purpose today.

Which issue(s) this PR fixes:

Part of #6864

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Misc

Lets operator users run FeatureStore pods under an existing
ServiceAccount (e.g. one annotated for IRSA or Vault) and attach extra
pod labels for log collectors or policy engines, without the Kyverno
workarounds that previously reassigned the operator-created
ServiceAccount and its RBAC bindings out of band.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
Add a "Running under a custom ServiceAccount" section to the security
guide with an IRSA/Vault example, and note that the operator binds
RBAC to the given ServiceAccount but does not create or annotate it.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
Add ServerConfigs.commandPrefix, prepended to the operator-generated
server command, so users can wrap the Feast server with tools such as
opentelemetry-instrument or a profiler without overriding the computed
command (port, TLS, workers, metrics) themselves. A verbatim
command/args override was rejected in favor of this because it makes
the operator's flags easy to silently drop as it evolves.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
setLineageDeployment builds its container Command directly rather than
through getContainerCommand, and had no test asserting on it with
commandPrefix set. Add one, verifying the prefix is prepended and Args
is unaffected.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
Add a "Wrapping the server command" section to the serving guide with
an opentelemetry-instrument example, and note that the wrapper binary
must already be in the image and that init containers are not wrapped.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
@dbbvitor
dbbvitor requested a review from a team as a code owner October 15, 2026 14:00
@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.94%. Comparing base (386759c) to head (722ee8e).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7023   +/-   ##
=======================================
  Coverage   50.94%   50.94%           
=======================================
  Files         455      455           
  Lines       56915    56915           
  Branches     8290     8290           
=======================================
  Hits        28994    28994           
  Misses      25940    25940           
  Partials     1981     1981           
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 52.40% <ø> (ø)

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 386759c...722ee8e. 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.

dbbvitor and others added 6 commits October 16, 2026 11:09
A prior merge-conflict resolution kept arbitrary line numbers for
already-allowlisted secrets instead of the real ones, which detect-secrets'
CI run (unlike a local run) treats as a hard failure when it needs to
rewrite the baseline. No entries added or removed.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
commandPrefix was missing from the CRD schema's McpServerConfig-nested
ServerConfigs block in config/crd/bases/feast.dev_featurestores.yaml and
dist/install.yaml -- the manual regeneration during an earlier rebase
missed this one of several ServerConfigs embeddings. Re-ran
controller-gen + kustomize build to regenerate both consistently.

Also refreshes .secrets.baseline line numbers shifted by the above.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>
commandPrefix was also missing from bundle/manifests/feast.dev_featurestores.yaml,
a separate generation target (make bundle) from config/crd/bases and
dist/install.yaml fixed in the previous commit. Re-ran the full bundle
sequence (operator-sdk generate kustomize manifests, kustomize build,
operator-sdk generate bundle) so all three stay in sync.

Signed-off-by: dbbvitor <vitor.diniz@gympass.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants