Skip to content

feat(operator): implement basic fact operator#857

Draft
Molter73 wants to merge 5 commits into
mainfrom
mauro/feat/fact-operator
Draft

feat(operator): implement basic fact operator#857
Molter73 wants to merge 5 commits into
mainfrom
mauro/feat/fact-operator

Conversation

@Molter73

Copy link
Copy Markdown
Collaborator

Description

Still a WIP and more of an experiment than production ready operator.

Checklist

  • Patch has a change log entry OR does not need one.
  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why you did not do so. (Valid reasons include "CI is sufficient" or "No testable changes")
In addition to reviewing your code, reviewers must also review your testing instructions, and make sure they are sufficient.

For more details, ref the Confluence page about this section.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Enterprise

Run ID: 1679b864-84c7-4174-b860-3581f020a4b4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mauro/feat/fact-operator

Comment @coderabbitai help to get the list of available commands.

Molter73 added 3 commits June 22, 2026 14:56
At this point the operator is a PoC, meant only as a small experiment to
see if it is even possible to implement.

TODO:
* Expose more configuration options.
* Implement some sort of test that will ensure the operator works and
  deploys fact correctly.
This requires some refactoring to re-use the FactConfig struct as part
of the CRD spec for fact. We also make all configuration apply through a
config map, which means we can hotreload the configuration as required.

Still needs more testing, but so far it looks good.
@Molter73 Molter73 force-pushed the mauro/feat/fact-operator branch from cfbdf99 to cf00347 Compare June 22, 2026 12:56
@codecov-commenter

codecov-commenter commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.04651% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.41%. Comparing base (0e7b1cb) to head (2087a70).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
fact-operator/src/lib.rs 0.00% 47 Missing ⚠️
fact-operator/src/spec.rs 98.14% 3 Missing and 2 partials ⚠️
fact-core/src/lib.rs 0.00% 3 Missing ⚠️
fact-operator/src/main.rs 0.00% 3 Missing ⚠️
fact/src/lib.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #857      +/-   ##
==========================================
+ Coverage   27.96%   36.41%   +8.44%     
==========================================
  Files          21       25       +4     
  Lines        2596     3021     +425     
  Branches     2596     3021     +425     
==========================================
+ Hits          726     1100     +374     
- Misses       1867     1916      +49     
- Partials        3        5       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Molter73 Molter73 force-pushed the mauro/feat/fact-operator branch from 6429ba3 to cf00347 Compare June 22, 2026 13:50
Molter73 added 2 commits June 22, 2026 18:26
The tests are a bit basic, they simply generate a Fact object from a
fixed spec, build the objects and compare them agains expected values.

In order to simplify the daemonset tests, a DaemonSetBuilder object is
created. This object can be built with default values or from a Fact
object. Ultimately, the tests use both approaches to compare the final
result is the same.
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