Skip to content

Commit 1e82f62

Browse files
committed
fix crd default, add comments
1 parent 9cdf308 commit 1e82f62

File tree

2 files changed

+6
-4
lines changed
  • deploy/helm/spark-k8s-operator/crds
  • rust/operator-binary/src/connect

2 files changed

+6
-4
lines changed

deploy/helm/spark-k8s-operator/crds/crds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,14 +2332,14 @@ spec:
23322332
type: object
23332333
x-kubernetes-preserve-unknown-fields: true
23342334
role_config:
2335+
default:
2336+
listener_class: cluster-internal
23352337
properties:
23362338
listener_class:
23372339
default: cluster-internal
23382340
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose the Spark services.
23392341
type: string
23402342
type: object
2341-
required:
2342-
- role_config
23432343
type: object
23442344
vectorAggregatorConfigMapName:
23452345
description: Name of the Vector aggregator discovery ConfigMap. It must contain the key `ADDRESS` with the address of the Vector aggregator.

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,17 @@ pub mod versioned {
101101
pub executor: Option<CommonConfiguration<ExecutorConfigFragment, JavaCommonConfig>>,
102102
}
103103

104-
/// This struct i
104+
/// This struct is a wrapper for the `ServerConfig` in order to keep the `spec.server.roleConfig` setting consistent.
105+
/// It is required since Spark Connect does not utilize the Stackable `Role` and therefore does not offer a `roleConfig`.
105106
#[derive(Clone, Debug, Default, JsonSchema, PartialEq, Serialize, Deserialize)]
106107
pub struct SparkConnectServerConfigWrapper {
107108
#[serde(flatten)]
108109
pub config: Option<CommonConfiguration<ServerConfigFragment, JavaCommonConfig>>,
109-
110+
#[serde(default)]
110111
pub role_config: SparkConnectServerRoleConfig,
111112
}
112113

114+
/// Global role config settings for the Spark Connect Server.
113115
#[derive(Clone, Debug, JsonSchema, PartialEq, Serialize, Deserialize)]
114116
pub struct SparkConnectServerRoleConfig {
115117
/// This field controls which [ListenerClass](DOCS_BASE_URL_PLACEHOLDER/listener-operator/listenerclass.html) is used to expose the Spark services.

0 commit comments

Comments
 (0)