Skip to content

Commit 6135034

Browse files
docs: Improve the descriptions of the CRD
1 parent a9e51be commit 6135034

3 files changed

Lines changed: 73 additions & 11 deletions

File tree

extra/crds.yaml

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,10 +1870,31 @@ spec:
18701870
default:
18711871
jsonMergePatch: {}
18721872
description: |-
1873-
Combination of [`JsonConfigOverrides`] and [`KeyValueConfigOverrides`]
1873+
ConfigOverrides as key-value pairs, JSON merge patch or JSON object.
18741874
1875-
Provides a backwards-compatible way to supply config overrides either as key-value pairs or as
1876-
a JSON value.
1875+
The key-value pairs and the JSON merge patch are merged with the configuration provided by the
1876+
operator. The user provided JSON object replaces the configuration of the operator.
1877+
1878+
Example for key-value pairs:
1879+
1880+
stringProperty: new value
1881+
booleanProperty: "true"
1882+
1883+
Example for a JSON merge patch:
1884+
1885+
jsonMergePatch:
1886+
stringProperty: new value
1887+
booleanProperty: true
1888+
nestedProperty:
1889+
key: value
1890+
1891+
Example for a JSON object:
1892+
1893+
userProvided:
1894+
stringProperty: new value
1895+
booleanProperty: true
1896+
nestedProperty:
1897+
key: value
18771898
type: object
18781899
x-kubernetes-preserve-unknown-fields: true
18791900
type: object
@@ -1949,7 +1970,6 @@ spec:
19491970
type: object
19501971
roleGroups:
19511972
additionalProperties:
1952-
description: Variant of [`stackable_operator::role_utils::GenericCommonConfig`] that implements [`Merge`]
19531973
properties:
19541974
cliOverrides:
19551975
additionalProperties:
@@ -2565,10 +2585,31 @@ spec:
25652585
default:
25662586
jsonMergePatch: {}
25672587
description: |-
2568-
Combination of [`JsonConfigOverrides`] and [`KeyValueConfigOverrides`]
2588+
ConfigOverrides as key-value pairs, JSON merge patch or JSON object.
2589+
2590+
The key-value pairs and the JSON merge patch are merged with the configuration provided by the
2591+
operator. The user provided JSON object replaces the configuration of the operator.
2592+
2593+
Example for key-value pairs:
2594+
2595+
stringProperty: new value
2596+
booleanProperty: "true"
2597+
2598+
Example for a JSON merge patch:
2599+
2600+
jsonMergePatch:
2601+
stringProperty: new value
2602+
booleanProperty: true
2603+
nestedProperty:
2604+
key: value
2605+
2606+
Example for a JSON object:
25692607
2570-
Provides a backwards-compatible way to supply config overrides either as key-value pairs or as
2571-
a JSON value.
2608+
userProvided:
2609+
stringProperty: new value
2610+
booleanProperty: true
2611+
nestedProperty:
2612+
key: value
25722613
type: object
25732614
x-kubernetes-preserve-unknown-fields: true
25742615
type: object

rust/operator-binary/src/framework/config_overrides.rs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,31 @@ impl From<KeyValueConfigOverrides> for JsonConfigOverrides {
9191
}
9292
}
9393

94-
/// Combination of [`JsonConfigOverrides`] and [`KeyValueConfigOverrides`]
94+
/// ConfigOverrides as key-value pairs, JSON merge patch or JSON object.
9595
///
96-
/// Provides a backwards-compatible way to supply config overrides either as key-value pairs or as
97-
/// a JSON value.
96+
/// The key-value pairs and the JSON merge patch are merged with the configuration provided by the
97+
/// operator. The user provided JSON object replaces the configuration of the operator.
98+
///
99+
/// Example for key-value pairs:
100+
///
101+
/// stringProperty: new value
102+
/// booleanProperty: "true"
103+
///
104+
/// Example for a JSON merge patch:
105+
///
106+
/// jsonMergePatch:
107+
/// stringProperty: new value
108+
/// booleanProperty: true
109+
/// nestedProperty:
110+
/// key: value
111+
///
112+
/// Example for a JSON object:
113+
///
114+
/// userProvided:
115+
/// stringProperty: new value
116+
/// booleanProperty: true
117+
/// nestedProperty:
118+
/// key: value
98119
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
99120
#[serde(untagged)]
100121
#[schemars(schema_with = "raw_object_schema")]

rust/operator-binary/src/framework/role_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::{
2222
},
2323
};
2424

25-
/// Variant of [`stackable_operator::role_utils::GenericCommonConfig`] that implements [`Merge`]
25+
// Variant of [`stackable_operator::role_utils::GenericCommonConfig`] that implements [`Merge`]
2626
#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize)]
2727
pub struct GenericCommonConfig {}
2828

0 commit comments

Comments
 (0)