Skip to content

Commit 3bec60f

Browse files
sbernauerdervoeti
authored andcommitted
chore: Update to stackable-operator 0.95.0 (#759)
1 parent 610604a commit 3bec60f

File tree

11 files changed

+677
-497
lines changed

11 files changed

+677
-497
lines changed

Cargo.lock

Lines changed: 243 additions & 202 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 394 additions & 257 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/opa-operator"
1111

1212
[workspace.dependencies]
1313
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" }
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.94.0" }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.95.0" }
1515
krb5 = { git = "https://github.com/stackabletech/krb5-rs.git", tag = "v0.1.0" }
1616

1717

crate-hashes.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/bundle-builder/src/main.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ async fn main() -> Result<(), StartupError> {
8383
// - The console log level was set by `OPA_BUNDLE_BUILDER_LOG`, and is now `CONSOLE_LOG` (when using Tracing::pre_configured).
8484
// - The file log level was set by `OPA_BUNDLE_BUILDER_LOG`, and is now set via `FILE_LOG` (when using Tracing::pre_configured).
8585
// - The file log directory was set by `OPA_BUNDLE_BUILDER_LOG_DIRECTORY`, and is now set by `ROLLING_LOGS_DIR` (or via `--rolling-logs <DIRECTORY>`).
86-
let _tracing_guard =
87-
Tracing::pre_configured(built_info::PKG_NAME, args.common.telemetry_arguments)
88-
.init()
89-
.context(TracingInitSnafu)?;
86+
let _tracing_guard = Tracing::pre_configured(built_info::PKG_NAME, args.common.telemetry)
87+
.init()
88+
.context(TracingInitSnafu)?;
9089

9190
tracing::info!(
9291
built_info.pkg_version = built_info::PKG_VERSION,
@@ -97,10 +96,9 @@ async fn main() -> Result<(), StartupError> {
9796
"Starting bundle-builder",
9897
);
9998

100-
let client =
101-
stackable_operator::client::initialize_operator(None, &args.common.cluster_info_opts)
102-
.await
103-
.context(InitKubeSnafu)?;
99+
let client = stackable_operator::client::initialize_operator(None, &args.common.cluster_info)
100+
.await
101+
.context(InitKubeSnafu)?;
104102

105103
let (store, store_w) = reflector::store();
106104
let rebuild_bundle = || {

rust/operator-binary/src/controller.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use stackable_operator::{
2828
},
2929
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
3030
commons::{
31-
product_image_selection::ResolvedProductImage,
31+
product_image_selection::{self, ResolvedProductImage},
3232
rbac::build_rbac_resources,
3333
secret_class::{SecretClassVolume, SecretClassVolumeScope},
3434
tls_verification::{TlsClientDetails, TlsClientDetailsError},
@@ -65,11 +65,11 @@ use stackable_operator::{
6565
},
6666
},
6767
role_utils::RoleGroupRef,
68+
shared::time::Duration,
6869
status::condition::{
6970
compute_conditions, daemonset::DaemonSetConditionBuilder,
7071
operations::ClusterOperationsConditionBuilder,
7172
},
72-
time::Duration,
7373
utils::{COMMON_BASH_TRAP_FUNCTIONS, cluster_info::KubernetesClusterInfo},
7474
};
7575
use strum::{EnumDiscriminants, IntoStaticStr};
@@ -338,6 +338,11 @@ pub enum Error {
338338
TlsVolumeBuild {
339339
source: builder::pod::volume::SecretOperatorVolumeSourceBuilderError,
340340
},
341+
342+
#[snafu(display("failed to resolve product image"))]
343+
ResolveProductImage {
344+
source: product_image_selection::Error,
345+
},
341346
}
342347
type Result<T, E = Error> = std::result::Result<T, E>;
343348

@@ -437,7 +442,8 @@ pub async fn reconcile_opa(
437442
let resolved_product_image = opa
438443
.spec
439444
.image
440-
.resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::PKG_VERSION);
445+
.resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::PKG_VERSION)
446+
.context(ResolveProductImageSnafu)?;
441447
let opa_role = v1alpha1::OpaRole::Server;
442448

443449
let mut cluster_resources = ClusterResources::new(
@@ -638,7 +644,7 @@ pub fn build_server_role_service(
638644
.context(ObjectMissingMetadataForOwnerRefSnafu)?
639645
.with_recommended_labels(build_recommended_labels(
640646
opa,
641-
&resolved_product_image.app_version_label,
647+
&resolved_product_image.app_version_label_value,
642648
&role_name,
643649
"global",
644650
))
@@ -689,7 +695,7 @@ fn build_rolegroup_headless_service(
689695
.context(ObjectMissingMetadataForOwnerRefSnafu)?
690696
.with_recommended_labels(build_recommended_labels(
691697
opa,
692-
&resolved_product_image.app_version_label,
698+
&resolved_product_image.app_version_label_value,
693699
&rolegroup.role,
694700
&rolegroup.role_group,
695701
))
@@ -736,7 +742,7 @@ fn build_rolegroup_metrics_service(
736742
.context(ObjectMissingMetadataForOwnerRefSnafu)?
737743
.with_recommended_labels(build_recommended_labels(
738744
opa,
739-
&resolved_product_image.app_version_label,
745+
&resolved_product_image.app_version_label_value,
740746
&rolegroup.role,
741747
&rolegroup.role_group,
742748
))
@@ -784,7 +790,7 @@ fn build_server_rolegroup_config_map(
784790
.context(ObjectMissingMetadataForOwnerRefSnafu)?
785791
.with_recommended_labels(build_recommended_labels(
786792
opa,
787-
&resolved_product_image.app_version_label,
793+
&resolved_product_image.app_version_label_value,
788794
&rolegroup.role,
789795
&rolegroup.role_group,
790796
))
@@ -1053,7 +1059,7 @@ fn build_server_rolegroup_daemonset(
10531059
let pb_metadata = ObjectMetaBuilder::new()
10541060
.with_recommended_labels(build_recommended_labels(
10551061
opa,
1056-
&resolved_product_image.app_version_label,
1062+
&resolved_product_image.app_version_label_value,
10571063
&rolegroup_ref.role,
10581064
&rolegroup_ref.role_group,
10591065
))
@@ -1266,7 +1272,7 @@ fn build_server_rolegroup_daemonset(
12661272
.context(ObjectMissingMetadataForOwnerRefSnafu)?
12671273
.with_recommended_labels(build_recommended_labels(
12681274
opa,
1269-
&resolved_product_image.app_version_label,
1275+
&resolved_product_image.app_version_label_value,
12701276
&rolegroup_ref.role,
12711277
&rolegroup_ref.role_group,
12721278
))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use stackable_operator::{
2424
EmptyRoleConfig, GenericProductSpecificCommonConfig, Role, RoleGroup, RoleGroupRef,
2525
},
2626
schemars::{self, JsonSchema},
27+
shared::time::Duration,
2728
status::condition::{ClusterCondition, HasStatusCondition},
28-
time::Duration,
2929
utils::cluster_info::KubernetesClusterInfo,
3030
versioned::versioned,
3131
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use stackable_operator::{
77
tls_verification::{CaCert, Tls, TlsClientDetails, TlsServerVerification, TlsVerification},
88
},
99
schemars::{self, JsonSchema},
10-
time::Duration,
10+
shared::time::Duration,
1111
versioned::versioned,
1212
};
1313

rust/operator-binary/src/discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fn build_discovery_configmap(
9090
})?
9191
.with_recommended_labels(build_recommended_labels(
9292
opa,
93-
&resolved_product_image.app_version_label,
93+
&resolved_product_image.app_version_label_value,
9494
&v1alpha1::OpaRole::Server.to_string(),
9595
"discovery",
9696
))

rust/operator-binary/src/main.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ async fn main() -> anyhow::Result<()> {
7373
ProductOperatorRun {
7474
product_config,
7575
watch_namespace,
76-
telemetry_arguments,
77-
cluster_info_opts,
76+
operator_environment: _,
77+
telemetry,
78+
cluster_info,
7879
},
7980
}) => {
8081
// NOTE (@NickLarsenNZ): Before stackable-telemetry was used:
8182
// - The console log level was set by `OPA_OPERATOR_LOG`, and is now `CONSOLE_LOG` (when using Tracing::pre_configured).
8283
// - The file log level was set by `OPA_OPERATOR_LOG`, and is now set via `FILE_LOG` (when using Tracing::pre_configured).
8384
// - The file log directory was set by `OPA_OPERATOR_LOG_DIRECTORY`, and is now set by `ROLLING_LOGS_DIR` (or via `--rolling-logs <DIRECTORY>`).
84-
let _tracing_guard =
85-
Tracing::pre_configured(built_info::PKG_NAME, telemetry_arguments).init()?;
85+
let _tracing_guard = Tracing::pre_configured(built_info::PKG_NAME, telemetry).init()?;
8686

8787
tracing::info!(
8888
built_info.pkg_version = built_info::PKG_VERSION,
@@ -99,8 +99,7 @@ async fn main() -> anyhow::Result<()> {
9999
])?;
100100

101101
let client =
102-
client::initialize_operator(Some(OPERATOR_NAME.to_string()), &cluster_info_opts)
103-
.await?;
102+
client::initialize_operator(Some(OPERATOR_NAME.to_string()), &cluster_info).await?;
104103
let kubernetes_cluster_info = client.kubernetes_cluster_info.clone();
105104
create_controller(
106105
client,

0 commit comments

Comments
 (0)