Skip to content

feat: Management Access utilities - #1290

Open
labrenbe wants to merge 19 commits into
mainfrom
feat/platform-access
Open

labrenbe wants to merge 19 commits into
mainfrom
feat/platform-access

Conversation

@labrenbe

@labrenbe labrenbe commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Description

Adds shared utilities required for stackabletech/kafka-operator#1028.

  • labels and selectors for agents
  • new enum for platform access with TLS

Depends on https://github.com/stackabletech/decisions/issues/98 and https://github.com/stackabletech/decisions/issues/99.

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.
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

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

@labrenbe labrenbe self-assigned this Oct 1, 2026
@labrenbe
labrenbe force-pushed the feat/platform-access branch from c3e3121 to 3be4832 Compare October 1, 2026 12:09
@labrenbe
labrenbe force-pushed the feat/platform-access branch from 3be4832 to 7cb677e Compare October 1, 2026 12:12

/// The desired state of one condition, without the bookkeeping fields.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ManagedCondition {

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.

We have proper ClusterConditions https://github.com/stackabletech/operator-rs/blob/main/crates/stackable-operator/src/status/condition/mod.rs#L90 that might be reused or made generic to add custom condition type / etc.?

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.

I believe this definitely makes sense and I considered using the utility around ClusterCondition but it would require a larger refactor which I didn't want to do in this PR.

Comment thread crates/stackable-operator/src/crd/platform_access/tls/v1alpha1_impl.rs Outdated
Comment thread crates/stackable-operator/src/v2/kvp/label.rs Outdated
Comment thread crates/stackable-operator/src/commons/management_access/condition.rs Outdated
Comment thread crates/stackable-operator/src/crd/management_access/tls/v1alpha1_impl.rs Outdated
Comment thread crates/stackable-operator/src/commons/platform_access/ownership.rs Outdated
Comment thread crates/stackable-operator/src/commons/management_access/condition.rs Outdated
Comment thread crates/stackable-operator/src/commons/platform_access/ownership.rs Outdated
Comment thread crates/stackable-operator/src/commons/platform_access/ownership.rs Outdated
@labrenbe labrenbe changed the title feat: Platform Access utilities feat: Management Access utilities Oct 23, 2026
@labrenbe
labrenbe force-pushed the feat/platform-access branch from 586debd to 22536cd Compare October 23, 2026 16:06
@labrenbe
labrenbe marked this pull request as ready for review October 23, 2026 16:34
@labrenbe labrenbe moved this to Development: Waiting for Review in Stackable Engineering Oct 23, 2026
@labrenbe labrenbe moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 23, 2026
Retain,

/// Delete the resource in the product.
Delete,

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.

Question regarding a specific scenario: I guess it would be possible for someone to create a KafkaTopic object with a Kafka topic they theoretically shouldn't have permissions for and then just delete that object, in turn deleting that Kafka topic in the cluster. Would that be covered with authorization somehow? That scenario would be relevant for different user groups managing different topics in the same cluster but I think Kafka has also some system topics?

@xeniape

xeniape commented Oct 26, 2026

Copy link
Copy Markdown
Member

Claude noted down some possible lifecycle problems/decisions:

  • The managed object would need a finalizer on deletion, otherwise the object gets deleted right away and the agent might not have had enough time reading the specs of the object needed to execute deletion logic in the product. So the object might never get deleted. So the finalizer would be definitely needed.
  • BUT with the finalizer another problem pops up: the deletion process might get stuck if there is no one removing that finalizer again. This can happen in different scenarios, for example someone could delete the product cluster or namespace and if the agent gets removed because of that before the deletion process is done and the finalizer removed, there is no one to remove that finalizer so the namespace deletion is stuck. So either the agent needs to stay alive until everything is processed or someone else (operator?) needs to release the objects

Not sure if this is part of this PR or not, but it seemed general enough to mention it in the operator-rs changes, if this provides some mechanism for all the operators.

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

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

4 participants