From 449ca2f4960d32d51710f992ab90e10bbd9edb4f Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Fri, 10 May 2024 14:27:44 +0200 Subject: [PATCH] adress review comments --- rust/crd/src/affinity.rs | 5 +---- rust/crd/src/authentication.rs | 10 ++++++---- rust/operator-binary/src/rbac.rs | 12 ++++++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/rust/crd/src/affinity.rs b/rust/crd/src/affinity.rs index 8272c629..e84f9a8e 100644 --- a/rust/crd/src/affinity.rs +++ b/rust/crd/src/affinity.rs @@ -81,11 +81,8 @@ mod tests { ) ])) }), - match_label_keys: None, - mismatch_label_keys: None, - namespace_selector: None, - namespaces: None, topology_key: "kubernetes.io/hostname".to_string(), + ..PodAffinityTerm::default() }, weight: 70 } diff --git a/rust/crd/src/authentication.rs b/rust/crd/src/authentication.rs index 8f24e88d..ee1a802f 100644 --- a/rust/crd/src/authentication.rs +++ b/rust/crd/src/authentication.rs @@ -324,11 +324,13 @@ mod tests { use std::pin::Pin; use indoc::indoc; - use stackable_operator::commons::authentication::{ - oidc, - tls::{CaCert, Tls, TlsClientDetails, TlsServerVerification, TlsVerification}, + use stackable_operator::{ + commons::authentication::{ + oidc, + tls::{CaCert, Tls, TlsClientDetails, TlsServerVerification, TlsVerification}, + }, + kube, }; - use stackable_operator::kube; use super::*; diff --git a/rust/operator-binary/src/rbac.rs b/rust/operator-binary/src/rbac.rs index 7881e50d..8fb8928e 100644 --- a/rust/operator-binary/src/rbac.rs +++ b/rust/operator-binary/src/rbac.rs @@ -1,7 +1,11 @@ -use stackable_operator::builder::meta::ObjectMetaBuilder; -use stackable_operator::k8s_openapi::api::core::v1::ServiceAccount; -use stackable_operator::k8s_openapi::api::rbac::v1::{RoleBinding, RoleRef, Subject}; -use stackable_operator::kube::{Resource, ResourceExt}; +use stackable_operator::{ + builder::meta::ObjectMetaBuilder, + k8s_openapi::api::{ + core::v1::ServiceAccount, + rbac::v1::{RoleBinding, RoleRef, Subject}, + }, + kube::{Resource, ResourceExt}, +}; /// Obsolete: only used in the DB controller for historical reasons. Scheduled for deletion /// once the entire DB controller is deleted as discused here: