Skip to content

Commit 4f42a32

Browse files
committed
implement resource requests
1 parent 87655f9 commit 4f42a32

File tree

1 file changed

+10
-4
lines changed
  • rust/operator-binary/src/connect

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,20 @@ impl ConnectConfig {
221221
}
222222
}
223223

224+
// This is the equivalent to merged_config() in other ops
225+
// only here we only need to merge operator defaults with
226+
// user configuration.
224227
impl v1alpha1::SparkConnectServer {
225-
// This is the equivalent og merged_config() in other ops
226-
// only here we have nothing to merge.
227228
pub fn conect_config(&self) -> Result<ConnectConfig, Error> {
229+
let defaults = ConnectConfig::default_config();
228230
fragment::validate(
229231
match self.spec.server.as_ref().map(|cc| cc.config.clone()) {
230-
Some(fragment) => fragment.clone(),
231-
_ => ConnectConfig::default_config(),
232+
Some(fragment) => {
233+
let mut fc = fragment.clone();
234+
fc.merge(&defaults);
235+
fc
236+
}
237+
_ => defaults,
232238
},
233239
)
234240
.context(FragmentValidationFailureSnafu)

0 commit comments

Comments
 (0)