Skip to content

Commit a81351f

Browse files
docs: Extend the CRD documentation (#29)
1 parent 519f8ce commit a81351f

File tree

2 files changed

+20
-8
lines changed
  • deploy/helm/opensearch-operator/crds
  • rust/operator-binary/src/crd

2 files changed

+20
-8
lines changed

deploy/helm/opensearch-operator/crds/crds.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
description: Auto-generated derived type for OpenSearchClusterSpec via `CustomResource`
2424
properties:
2525
spec:
26-
description: A OpenSearch cluster stacklet. This resource is managed by the Stackable operator for OpenSearch. Find more information on how to use it and the resources that the operator generates in the [operator documentation](https://docs.stackable.tech/home/nightly/opensearch/).
26+
description: An OpenSearch cluster stacklet. This resource is managed by the Stackable operator for OpenSearch. Find more information on how to use it and the resources that the operator generates in the [operator documentation](https://docs.stackable.tech/home/nightly/opensearch/).
2727
properties:
2828
clusterOperation:
2929
default:
@@ -89,7 +89,7 @@ spec:
8989
type: string
9090
type: object
9191
nodes:
92-
description: OpenSearch nodes
92+
description: This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured on role level. There is also a second form of config, which can only be configured at role level, the `roleConfig`. You can learn more about this in the [Roles and role group concept documentation](https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).
9393
properties:
9494
cliOverrides:
9595
additionalProperties:
@@ -138,6 +138,10 @@ spec:
138138
nullable: true
139139
type: string
140140
nodeRoles:
141+
description: |-
142+
Roles of the OpenSearch node.
143+
144+
Consult the [node roles documentation](https://docs.stackable.tech/home/nightly/opensearch/usage-guide/node-roles) for details.
141145
items:
142146
enum:
143147
- cluster_manager
@@ -334,6 +338,10 @@ spec:
334338
nullable: true
335339
type: string
336340
nodeRoles:
341+
description: |-
342+
Roles of the OpenSearch node.
343+
344+
Consult the [node roles documentation](https://docs.stackable.tech/home/nightly/opensearch/usage-guide/node-roles) for details.
337345
items:
338346
enum:
339347
- cluster_manager

rust/operator-binary/src/crd/mod.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ const DEFAULT_LISTENER_CLASS: &str = "cluster-internal";
3535
#[versioned(version(name = "v1alpha1"))]
3636
pub mod versioned {
3737

38-
/// A OpenSearch cluster stacklet. This resource is managed by the Stackable operator for OpenSearch.
39-
/// Find more information on how to use it and the resources that the operator generates in the
40-
/// [operator documentation](DOCS_BASE_URL_PLACEHOLDER/opensearch/).
38+
/// An OpenSearch cluster stacklet. This resource is managed by the Stackable operator for
39+
/// OpenSearch. Find more information on how to use it and the resources that the operator
40+
/// generates in the [operator documentation](DOCS_BASE_URL_PLACEHOLDER/opensearch/).
4141
#[derive(Clone, CustomResource, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
4242
#[versioned(k8s(
4343
group = "opensearch.stackable.tech",
@@ -54,14 +54,14 @@ pub mod versioned {
5454
))]
5555
#[serde(rename_all = "camelCase")]
5656
pub struct OpenSearchClusterSpec {
57-
// no doc string - see ProductImage struct
57+
// no doc - docs in ProductImage struct.
5858
pub image: ProductImage,
5959

60-
// no doc string - see ClusterOperation struct
60+
// no doc - docs in ClusterOperation struct.
6161
#[serde(default)]
6262
pub cluster_operation: ClusterOperation,
6363

64-
/// OpenSearch nodes
64+
// no doc - docs in Role struct.
6565
pub nodes:
6666
Role<OpenSearchConfigFragment, GenericRoleConfig, GenericProductSpecificCommonConfig>,
6767
}
@@ -130,6 +130,10 @@ pub mod versioned {
130130
#[fragment_attrs(serde(default))]
131131
pub graceful_shutdown_timeout: Duration,
132132

133+
/// Roles of the OpenSearch node.
134+
///
135+
/// Consult the [node roles
136+
/// documentation](DOCS_BASE_URL_PLACEHOLDER/opensearch/usage-guide/node-roles) for details.
133137
pub node_roles: NodeRoles,
134138

135139
#[fragment_attrs(serde(default))]

0 commit comments

Comments
 (0)