Skip to content

Commit a321c41

Browse files
authored
docs: Add documentation for the roleGroups CRD field. (#1227)
1 parent cef9e66 commit a321c41

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

crates/stackable-operator/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111
- Add `Client::{get_feature_gates,get_enabled_feature_gates,get_disabled_feature_gates}` associated
1212
functions to retrieve all, enabled, or disabled feature gates from the Kubernetes apiserver ([#1207], [#1208]).
1313
- Add a new `v2` module that provides more type-safe variants of the existing functions ([#1225]).
14+
- Add documentation for the `roleGroups` field, which now shows up as a description in the generated CRDs ([#1227]).
1415

1516
### Changed
1617

@@ -20,6 +21,7 @@ All notable changes to this project will be documented in this file.
2021
[#1207]: https://github.com/stackabletech/operator-rs/pull/1207
2122
[#1208]: https://github.com/stackabletech/operator-rs/pull/1208
2223
[#1225]: https://github.com/stackabletech/operator-rs/pull/1225
24+
[#1227]: https://github.com/stackabletech/operator-rs/pull/1227
2325

2426
## [0.111.1] - 2026-04-28
2527

crates/stackable-operator/crds/DummyCluster.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,21 @@ spec:
17511751
nullable: true
17521752
type: integer
17531753
type: object
1754+
description: |-
1755+
The set of role groups for this role, keyed by their name.
1756+
1757+
A role group is a subset of the replicas of a role that share the same configuration,
1758+
allowing finer-grained control than the role level. This is useful to e.g. schedule groups
1759+
onto different classes of nodes or into different regions, or to run them with different
1760+
settings. Configuration set on a role group is merged on top of the role-level `config`,
1761+
with the more specific role group values taking precedence.
1762+
1763+
Every role needs at least one role group. A role with a single role group conventionally
1764+
names it `default`.
1765+
1766+
Read the
1767+
[roles and role groups concept documentation](https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups)
1768+
for more details.
17541769
type: object
17551770
required:
17561771
- roleGroups

crates/stackable-operator/src/role_utils.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,20 @@ pub struct Role<
327327
#[serde(default)]
328328
pub role_config: RoleConfig,
329329

330+
/// The set of role groups for this role, keyed by their name.
331+
///
332+
/// A role group is a subset of the replicas of a role that share the same configuration,
333+
/// allowing finer-grained control than the role level. This is useful to e.g. schedule groups
334+
/// onto different classes of nodes or into different regions, or to run them with different
335+
/// settings. Configuration set on a role group is merged on top of the role-level `config`,
336+
/// with the more specific role group values taking precedence.
337+
///
338+
/// Every role needs at least one role group. A role with a single role group conventionally
339+
/// names it `default`.
340+
///
341+
/// Read the
342+
/// [roles and role groups concept documentation](DOCS_BASE_URL_PLACEHOLDER/concepts/roles-and-role-groups)
343+
/// for more details.
330344
pub role_groups: HashMap<String, RoleGroup<Config, CommonConfig, ConfigOverrides>>,
331345
}
332346

0 commit comments

Comments
 (0)