Skip to content

Commit a471a55

Browse files
committed
docs: Add documentation for the roleGroups CRD field.
1 parent 90d4a2f commit a471a55

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

crates/stackable-operator/CHANGELOG.md

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

1314
### Changed
1415

@@ -18,6 +19,7 @@ All notable changes to this project will be documented in this file.
1819
[#1207]: https://github.com/stackabletech/operator-rs/pull/1207
1920
[#1208]: https://github.com/stackabletech/operator-rs/pull/1208
2021
[#1225]: https://github.com/stackabletech/operator-rs/pull/1225
22+
[#1227]: https://github.com/stackabletech/operator-rs/pull/1227
2123

2224
## [0.111.1] - 2026-04-28
2325

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

crates/stackable-operator/src/v2/macros/attributed_string_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ mod tests {
765765
}
766766

767767
#[test]
768-
fn test_attributed_string_type_json_schema_without_constaints() {
768+
fn test_attributed_string_type_json_schema_without_constraints() {
769769
type T = JsonSchemaWithoutConstraintsTest;
770770

771771
T::test_example();

0 commit comments

Comments
 (0)