Skip to content

Commit b9d7b4d

Browse files
committed
chore: Version HdfsClusterConfig
1 parent 2bb52a6 commit b9d7b4d

File tree

1 file changed

+38
-38
lines changed
  • rust/operator-binary/src/crd

1 file changed

+38
-38
lines changed

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

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub mod versioned {
146146
pub struct HdfsClusterSpec {
147147
/// Configuration that applies to all roles and role groups.
148148
/// This includes settings for authentication, logging and the ZooKeeper cluster to use.
149-
pub cluster_config: HdfsClusterConfig,
149+
pub cluster_config: v1alpha1::HdfsClusterConfig,
150150

151151
// no doc string - See ProductImage struct
152152
pub image: ProductImage,
@@ -168,6 +168,43 @@ pub mod versioned {
168168
pub journal_nodes:
169169
Option<Role<JournalNodeConfigFragment, GenericRoleConfig, JavaCommonConfig>>,
170170
}
171+
172+
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
173+
#[serde(rename_all = "camelCase")]
174+
pub struct HdfsClusterConfig {
175+
/// `dfsReplication` is the factor of how many times a file will be replicated to different data nodes.
176+
/// The default is 3.
177+
/// You need at least the same amount of data nodes so each file can be replicated correctly, otherwise a warning will be printed.
178+
#[serde(default = "default_dfs_replication_factor")]
179+
pub dfs_replication: u8,
180+
181+
/// Name of the Vector aggregator [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery).
182+
/// It must contain the key `ADDRESS` with the address of the Vector aggregator.
183+
/// Follow the [logging tutorial](DOCS_BASE_URL_PLACEHOLDER/tutorials/logging-vector-aggregator)
184+
/// to learn how to configure log aggregation with Vector.
185+
#[serde(skip_serializing_if = "Option::is_none")]
186+
pub vector_aggregator_config_map_name: Option<String>,
187+
188+
/// Name of the [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
189+
/// for a ZooKeeper cluster.
190+
pub zookeeper_config_map_name: String,
191+
192+
/// Settings related to user [authentication](DOCS_BASE_URL_PLACEHOLDER/usage-guide/security).
193+
pub authentication: Option<AuthenticationConfig>,
194+
195+
/// Authorization options for HDFS.
196+
/// Learn more in the [HDFS authorization usage guide](DOCS_BASE_URL_PLACEHOLDER/hdfs/usage-guide/security#authorization).
197+
#[serde(skip_serializing_if = "Option::is_none")]
198+
pub authorization: Option<AuthorizationConfig>,
199+
200+
// Scheduled for removal in v1alpha2, see https://github.com/stackabletech/issues/issues/504
201+
/// Deprecated, please use `.spec.nameNodes.config.listenerClass` and `.spec.dataNodes.config.listenerClass` instead.
202+
#[serde(default)]
203+
pub listener_class: DeprecatedClusterListenerClass,
204+
205+
/// Configuration to control HDFS topology (rack) awareness feature
206+
pub rack_awareness: Option<Vec<TopologyLabel>>,
207+
}
171208
}
172209

173210
impl HasStatusCondition for v1alpha1::HdfsCluster {
@@ -698,43 +735,6 @@ impl v1alpha1::HdfsCluster {
698735
}
699736
}
700737

701-
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
702-
#[serde(rename_all = "camelCase")]
703-
pub struct HdfsClusterConfig {
704-
/// `dfsReplication` is the factor of how many times a file will be replicated to different data nodes.
705-
/// The default is 3.
706-
/// You need at least the same amount of data nodes so each file can be replicated correctly, otherwise a warning will be printed.
707-
#[serde(default = "default_dfs_replication_factor")]
708-
pub dfs_replication: u8,
709-
710-
/// Name of the Vector aggregator [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery).
711-
/// It must contain the key `ADDRESS` with the address of the Vector aggregator.
712-
/// Follow the [logging tutorial](DOCS_BASE_URL_PLACEHOLDER/tutorials/logging-vector-aggregator)
713-
/// to learn how to configure log aggregation with Vector.
714-
#[serde(skip_serializing_if = "Option::is_none")]
715-
pub vector_aggregator_config_map_name: Option<String>,
716-
717-
/// Name of the [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
718-
/// for a ZooKeeper cluster.
719-
pub zookeeper_config_map_name: String,
720-
721-
/// Settings related to user [authentication](DOCS_BASE_URL_PLACEHOLDER/usage-guide/security).
722-
pub authentication: Option<AuthenticationConfig>,
723-
724-
/// Authorization options for HDFS.
725-
/// Learn more in the [HDFS authorization usage guide](DOCS_BASE_URL_PLACEHOLDER/hdfs/usage-guide/security#authorization).
726-
#[serde(skip_serializing_if = "Option::is_none")]
727-
pub authorization: Option<AuthorizationConfig>,
728-
729-
// Scheduled for removal in v1alpha2, see https://github.com/stackabletech/issues/issues/504
730-
/// Deprecated, please use `.spec.nameNodes.config.listenerClass` and `.spec.dataNodes.config.listenerClass` instead.
731-
#[serde(default)]
732-
pub listener_class: DeprecatedClusterListenerClass,
733-
734-
/// Configuration to control HDFS topology (rack) awareness feature
735-
pub rack_awareness: Option<Vec<TopologyLabel>>,
736-
}
737-
738738
#[derive(Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize)]
739739
#[serde(rename_all = "camelCase")]
740740
pub enum TopologyLabel {

0 commit comments

Comments
 (0)