Skip to content

Commit 1c1bfaf

Browse files
committed
wip
1 parent 57d5ac2 commit 1c1bfaf

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

rust/operator-binary/src/connect/server.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ fn probe() -> Probe {
613613
}
614614
}
615615

616+
// TODO: remove this and all rolegroup references
616617
fn dummy_role_group_ref(
617618
scs: &v1alpha1::SparkConnectServer,
618619
) -> RoleGroupRef<v1alpha1::SparkConnectServer> {
@@ -628,7 +629,9 @@ pub(crate) fn build_listener(
628629
role_config: &v1alpha1::SparkConnectServerRoleConfig,
629630
resolved_product_image: &ResolvedProductImage,
630631
) -> Result<listener::v1alpha1::Listener, Error> {
632+
//let listener_name = server_listener_name(scs);
631633
let listener_name = dummy_role_group_ref(scs).object_name();
634+
632635
let listener_class = role_config.listener_class.clone();
633636
let role = SparkConnectRole::Server.to_string();
634637
let recommended_object_labels =
@@ -656,3 +659,10 @@ pub(crate) fn build_listener(
656659
)
657660
.context(BuildListenerSnafu)
658661
}
662+
663+
fn server_listener_name(scs: &v1alpha1::SparkConnectServer) -> String {
664+
format!(
665+
"{cluster_name}-server",
666+
cluster_name = ObjectRef::from_obj(scs)
667+
)
668+
}

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ pub mod versioned {
8383
pub struct SparkHistoryServerSpec {
8484
pub image: ProductImage,
8585

86-
/// Global Spark history server configuration that applies to all roles.
87-
///
88-
/// This was previously used to hold the listener configuration, which has since moved
89-
/// to the role configuration.
90-
// TODO: remove?
91-
#[serde(default)]
92-
pub cluster_config: v1alpha1::SparkHistoryServerClusterConfig,
93-
9486
/// Name of the Vector aggregator discovery ConfigMap.
9587
/// It must contain the key `ADDRESS` with the address of the Vector aggregator.
9688
#[serde(skip_serializing_if = "Option::is_none")]
@@ -107,10 +99,6 @@ pub mod versioned {
10799
pub nodes: Role<HistoryConfigFragment, SparkHistoryServerRoleConfig, JavaCommonConfig>,
108100
}
109101

110-
#[derive(Clone, Deserialize, Debug, Default, Eq, JsonSchema, PartialEq, Serialize)]
111-
#[serde(rename_all = "camelCase")]
112-
pub struct SparkHistoryServerClusterConfig {}
113-
114102
// TODO: move generic version to op-rs?
115103
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
116104
#[serde(rename_all = "camelCase")]

tests/templates/kuttl/spark-connect/10-assert.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ metadata:
1010
status:
1111
readyReplicas: 1
1212
---
13+
apiVersion: v1
14+
kind: Service
15+
metadata:
16+
name: spark-connect-server
17+
spec:
18+
type: NodePort
19+
---
1320
apiVersion: kuttl.dev/v1beta1
1421
kind: TestAssert
1522
timeout: 300

tests/templates/kuttl/spark-connect/10-deploy-spark-connect.yaml.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ spec:
6262
jvmArgumentOverrides:
6363
add:
6464
- -Dmy.custom.jvm.arg=customValue
65-
config:
65+
roleConfig:
6666
listenerClass: external-unstable
67+
config:
6768
logging:
6869
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
6970
containers:

tests/templates/kuttl/spark-history-server/06-deploy-history-server.yaml.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ spec:
4444
# For possible properties see: https://spark.apache.org/docs/latest/monitoring.html#spark-history-server-configuration-options
4545
#sparkConf:
4646
nodes:
47-
config:
47+
roleConfig:
4848
listenerClass: external-unstable
49+
config:
4950
logging:
5051
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
5152
containers:

0 commit comments

Comments
 (0)