Skip to content

Commit 85935fe

Browse files
committed
feat: Include Spark connect in stacklet list
1 parent 380ba19 commit 85935fe

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

rust/stackable-cockpit/src/constants.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ pub const PRODUCT_NAMES: &[&str] = &[
3636
"kafka",
3737
"nifi",
3838
"opa",
39-
"spark-history-server",
39+
"spark-connect",
40+
"spark-history",
4041
"superset",
4142
"trino",
4243
"zookeeper",

rust/stackable-cockpit/src/platform/stacklet/mod.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,23 +168,31 @@ fn build_products_gvk_list<'a>(product_names: &[&'a str]) -> IndexMap<&'a str, G
168168
let mut map = IndexMap::new();
169169

170170
for product_name in product_names {
171-
// Why? Just why? Can we please make this consistent?
172-
if *product_name == "spark-history-server" {
171+
// Note(techassi): Why? Just why? Can we please make this consistent?
172+
// Note(sbernauer): I think it's legit that SparkHistoryServer and SparkConnectServer are in
173+
// the api group spark.stackable.tech. All of this will probably be rewritten any as soon as
174+
// we have versions different than v1alpha1.
175+
if *product_name == "spark-history" {
173176
map.insert(*product_name, GroupVersionKind {
174177
group: "spark.stackable.tech".into(),
175178
version: "v1alpha1".into(),
176179
kind: "SparkHistoryServer".into(),
177180
});
178-
continue;
181+
} else if *product_name == "spark-connect" {
182+
map.insert(*product_name, GroupVersionKind {
183+
group: "spark.stackable.tech".into(),
184+
version: "v1alpha1".into(),
185+
kind: "SparkConnectServer".into(),
186+
});
187+
} else {
188+
map.insert(*product_name, gvk_from_product_name(product_name));
179189
}
180-
181-
map.insert(*product_name, gvk_from_product_name(product_name));
182190
}
183191

184192
map
185193
}
186194

187-
// FIXME: Support SparkApplication
195+
// FIXME: Support SparkApplication and SparkConnectServer
188196
fn gvk_from_product_name(product_name: &str) -> GroupVersionKind {
189197
GroupVersionKind {
190198
group: format!("{product_name}.stackable.tech"),

0 commit comments

Comments
 (0)