Skip to content

Commit abd6e55

Browse files
committed
fix: remove empty dereference step
1 parent 04c7327 commit abd6e55

3 files changed

Lines changed: 4 additions & 48 deletions

File tree

rust/operator-binary/src/controller.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ use crate::{
8888
},
8989
};
9090

91-
mod dereference;
9291
mod validate;
9392

9493
pub const OPA_CONTROLLER_NAME: &str = "opacluster";
@@ -327,9 +326,6 @@ pub enum Error {
327326
#[snafu(display("failed to build service"))]
328327
BuildService { source: service::Error },
329328

330-
#[snafu(display("failed to dereference resources"))]
331-
Dereference { source: dereference::Error },
332-
333329
#[snafu(display("failed to validate cluster"))]
334330
ValidateCluster { source: validate::Error },
335331

@@ -442,19 +438,10 @@ pub async fn reconcile_opa(
442438

443439
let client = &ctx.client;
444440

445-
// dereference (client required)
446-
let dereferenced_objects = dereference::dereference(client, opa)
447-
.await
448-
.context(DereferenceSnafu)?;
449-
441+
// NOTE(@maltesander): There currently is no dereference (client required) step for OPA.
450442
// validate (no client required)
451-
let validated = validate::validate(
452-
opa,
453-
&dereferenced_objects,
454-
&ctx.operator_environment,
455-
&ctx.product_config,
456-
)
457-
.context(ValidateClusterSnafu)?;
443+
let validated = validate::validate(opa, &ctx.operator_environment, &ctx.product_config)
444+
.context(ValidateClusterSnafu)?;
458445

459446
let opa_role = OpaRole::Server;
460447

rust/operator-binary/src/controller/dereference.rs

Lines changed: 0 additions & 27 deletions
This file was deleted.

rust/operator-binary/src/controller/validate.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ use stackable_operator::{
1414
},
1515
};
1616

17-
use crate::{
18-
controller::dereference::DereferencedObjects,
19-
crd::{OpaRole, v1alpha2},
20-
};
17+
use crate::crd::{OpaRole, v1alpha2};
2118

2219
#[derive(Snafu, Debug)]
2320
pub enum Error {
@@ -48,7 +45,6 @@ pub struct ValidatedInputs {
4845
/// Validates the cluster spec and the dereferenced inputs.
4946
pub fn validate(
5047
opa: &v1alpha2::OpaCluster,
51-
_dereferenced_objects: &DereferencedObjects,
5248
operator_environment: &OperatorEnvironmentOptions,
5349
product_config: &ProductConfigManager,
5450
) -> Result<ValidatedInputs> {

0 commit comments

Comments
 (0)