Skip to content

refactor: Introduce build aggregator#814

Open
adwk67 wants to merge 7 commits into
mainfrom
feat/smooth-operator/introduce-builder
Open

refactor: Introduce build aggregator#814
adwk67 wants to merge 7 commits into
mainfrom
feat/smooth-operator/introduce-builder

Conversation

@adwk67

@adwk67 adwk67 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Description

Part of stackabletech/issues#864.

  • Plain KubernetesResources (5 fields, no generic); fallible build(cluster, sa_name) reusing existing builders
  • Reconcile rewritten to a build-then-apply loop (StatefulSets last)
  • The three secret calls isolated into ensure_random_secrets.
  • No behavioural change.
  • Built-SA name
  • Executor helpers moved to controller/mod.rs.

TODO

  • check internal secrets in deref step and apply later

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

// https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html#security-fernet
// does not document how long the fernet key should be, but recommends using
// python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
// which returns `jUm21LuA76YZmrIa9u4eXRg0h0P24MDC9IDOmDvJbfw=`, which has 44 characters, which makes 32 bytes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I dont get how the 44 characters make 32 bytes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's because it's Base64 encoded (plus padding etc.):

$ echo -n 'jUm21LuA76YZmrIa9u4eXRg0h0P24MDC9IDOmDvJbfw=' | base64 -d | wc -c
32

@maltesander maltesander Jul 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah...i would just remove that comment, the parameter clearly states that it is bytes. Or mention the base64?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment on lines +242 to +244
/// Ensures the three shared random Secrets (internal / JWT / Fernet) exist, creating any that are
/// missing. These are read-or-create client operations, so they cannot be part of the client-free
/// `build()` step.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not quite true as discussed, we can switch to deref (-> validate) and build steps.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As discussed, we'll leave this for a later PR when we can look at it with operators that have similar things (i.e. trino)

Comment thread rust/operator-binary/src/airflow_controller.rs Outdated
Comment thread rust/operator-binary/src/controller/build/mod.rs
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