Skip to content

Relax the length constraints of cluster, role and role group name#1222

Merged
maltesander merged 3 commits into
smooth-operatorfrom
relax-name-length-constraints
Jun 15, 2026
Merged

Relax the length constraints of cluster, role and role group name#1222
maltesander merged 3 commits into
smooth-operatorfrom
relax-name-length-constraints

Conversation

@siegfriedweber

Copy link
Copy Markdown
Member

Description

Relax the length constraints of cluster, role and role group name

Some operators use long role names like dagprocessor and middlemanager. Increasing the length of role names would require decreasing the length of cluster or role group name. These length constraints are already so tight that they could break existing cluster configurations. Instead, the length constraints were relaxed: ClusterName is now up to 40 characters, RoleName and RoleGroupName are up to 63 characters each, according to RFC 1123 label names. In turn, if the qualified role group name length exceeds its limit of 52 characters, it is truncated and a hash is added.

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

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

@siegfriedweber siegfriedweber self-assigned this Jun 12, 2026
@siegfriedweber siegfriedweber moved this to Development: Waiting for Review in Stackable Engineering Jun 12, 2026

@maltesander maltesander left a comment

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.

LGTM, there are some stale compile asserts not using the qualified_role_group_name assert "The string <cluster_name>-<hash>..." but "The string <cluster_name>-<role_name>-<role_group_name>...":

  • role_group_config_map
  • stateful_set_name
  • listener_name

Comment thread crates/stackable-operator/src/v2/role_group_utils.rs
@maltesander maltesander moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Jun 15, 2026

@adwk67 adwk67 left a comment

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.

Testing with superset/resources test that failed with current smooth-op branch.
Nit: does this change behaviour - e.g. where previously a name exceeding the allowed overall length would result in an error, the name is now silently adapted? If so, we should add something to the change log, along with the other breaking changes.

@siegfriedweber

Copy link
Copy Markdown
Member Author

Nit: does this change behaviour - e.g. where previously a name exceeding the allowed overall length would result in an error, the name is now silently adapted? If so, we should add something to the change log, along with the other breaking changes.

If a name exceeded the length limit, then the cluster spec was not rejected by the operator. It just applied the resources until Kubernetes complained. Usually, some Services and ConfigMaps were applied but the StatefulSet was not. The operator then went into an error loop.

This is in my opinion not a change but a new feature. The operator can now handle more specs than before.

@adwk67 adwk67 left a comment

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.

Local failing tests now pass.

@maltesander maltesander left a comment

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.

LGTM!

@maltesander maltesander merged commit a9fbbc8 into smooth-operator Jun 15, 2026
5 checks passed
@maltesander maltesander deleted the relax-name-length-constraints branch June 15, 2026 09:00
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.

3 participants