Skip to content

Commit bbd3a71

Browse files
committed
chore: Version HbaseClusterConfig
1 parent 8cbc8f7 commit bbd3a71

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
@@ -101,7 +101,7 @@ pub mod versioned {
101101

102102
/// Configuration that applies to all roles and role groups.
103103
/// This includes settings for logging, ZooKeeper and HDFS connection, among other things.
104-
pub cluster_config: HbaseClusterConfig,
104+
pub cluster_config: v1alpha1::HbaseClusterConfig,
105105

106106
// no doc string - See ClusterOperation struct
107107
#[serde(default)]
@@ -120,6 +120,43 @@ pub mod versioned {
120120
#[serde(default, skip_serializing_if = "Option::is_none")]
121121
pub rest_servers: Option<Role<HbaseConfigFragment, GenericRoleConfig, JavaCommonConfig>>,
122122
}
123+
124+
#[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
125+
#[serde(rename_all = "camelCase")]
126+
pub struct HbaseClusterConfig {
127+
/// Name of the [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
128+
/// for an HDFS cluster.
129+
pub hdfs_config_map_name: String,
130+
131+
/// Name of the Vector aggregator [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery).
132+
/// It must contain the key `ADDRESS` with the address of the Vector aggregator.
133+
/// Follow the [logging tutorial](DOCS_BASE_URL_PLACEHOLDER/tutorials/logging-vector-aggregator)
134+
/// to learn how to configure log aggregation with Vector.
135+
#[serde(skip_serializing_if = "Option::is_none")]
136+
pub vector_aggregator_config_map_name: Option<String>,
137+
138+
/// Name of the [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
139+
/// for a ZooKeeper cluster.
140+
pub zookeeper_config_map_name: String,
141+
142+
/// This field controls which type of Service the Operator creates for this HbaseCluster:
143+
///
144+
/// * cluster-internal: Use a ClusterIP service
145+
///
146+
/// * external-unstable: Use a NodePort service
147+
///
148+
/// This is a temporary solution with the goal to keep yaml manifests forward compatible.
149+
/// In the future, this setting will control which [ListenerClass](DOCS_BASE_URL_PLACEHOLDER/listener-operator/listenerclass.html)
150+
/// will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
151+
#[serde(default)]
152+
pub listener_class: CurrentlySupportedListenerClasses,
153+
154+
/// Settings related to user [authentication](DOCS_BASE_URL_PLACEHOLDER/usage-guide/security).
155+
pub authentication: Option<AuthenticationConfig>,
156+
157+
#[serde(default, skip_serializing_if = "Option::is_none")]
158+
pub authorization: Option<AuthorizationConfig>,
159+
}
123160
}
124161

125162
#[derive(Snafu, Debug)]
@@ -140,43 +177,6 @@ pub enum Error {
140177
FragmentValidationFailure { source: ValidationError },
141178
}
142179

143-
#[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
144-
#[serde(rename_all = "camelCase")]
145-
pub struct HbaseClusterConfig {
146-
/// Name of the [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
147-
/// for an HDFS cluster.
148-
pub hdfs_config_map_name: String,
149-
150-
/// Name of the Vector aggregator [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery).
151-
/// It must contain the key `ADDRESS` with the address of the Vector aggregator.
152-
/// Follow the [logging tutorial](DOCS_BASE_URL_PLACEHOLDER/tutorials/logging-vector-aggregator)
153-
/// to learn how to configure log aggregation with Vector.
154-
#[serde(skip_serializing_if = "Option::is_none")]
155-
pub vector_aggregator_config_map_name: Option<String>,
156-
157-
/// Name of the [discovery ConfigMap](DOCS_BASE_URL_PLACEHOLDER/concepts/service_discovery)
158-
/// for a ZooKeeper cluster.
159-
pub zookeeper_config_map_name: String,
160-
161-
/// This field controls which type of Service the Operator creates for this HbaseCluster:
162-
///
163-
/// * cluster-internal: Use a ClusterIP service
164-
///
165-
/// * external-unstable: Use a NodePort service
166-
///
167-
/// This is a temporary solution with the goal to keep yaml manifests forward compatible.
168-
/// In the future, this setting will control which [ListenerClass](DOCS_BASE_URL_PLACEHOLDER/listener-operator/listenerclass.html)
169-
/// will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
170-
#[serde(default)]
171-
pub listener_class: CurrentlySupportedListenerClasses,
172-
173-
/// Settings related to user [authentication](DOCS_BASE_URL_PLACEHOLDER/usage-guide/security).
174-
pub authentication: Option<AuthenticationConfig>,
175-
176-
#[serde(default, skip_serializing_if = "Option::is_none")]
177-
pub authorization: Option<AuthorizationConfig>,
178-
}
179-
180180
// TODO: Temporary solution until listener-operator is finished
181181
#[derive(Clone, Debug, Default, Display, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
182182
#[serde(rename_all = "PascalCase")]

0 commit comments

Comments
 (0)