Skip to content

Commit 85f141a

Browse files
chore: Update templated files (9001281) (#561)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@9001281 Reference-to: stackabletech/operator-templating@9001281 (Fix pre-commit hook) * chore: Apply formatting * chore: Bump openssl to 0.10.70 to fix RUSTSEC-2025-0004 --------- Co-authored-by: Techassi <[email protected]>
1 parent 6959540 commit 85f141a

File tree

16 files changed

+52
-58
lines changed

16 files changed

+52
-58
lines changed

.github/workflows/pr_pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
CARGO_TERM_COLOR: always
9-
RUST_TOOLCHAIN_VERSION: "1.82.0"
9+
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
1010
HADOLINT_VERSION: "v2.12.0"
1111
PYTHON_VERSION: "3.12"
1212

.pre-commit-config.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ repos:
1717
- repo: https://github.com/doublify/pre-commit-rust
1818
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
1919
hooks:
20-
- id: fmt
21-
# Pinning to a specific rustc version, so that we get consistent formatting
22-
entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt
23-
args: ["--all", "--", "--check"]
2420
- id: clippy
2521
args: ["--all-targets", "--", "-D", "warnings"]
2622

@@ -78,3 +74,10 @@ repos:
7874
entry: cargo test
7975
stages: [pre-commit, pre-merge-commit, manual]
8076
pass_filenames: false
77+
78+
- id: cargo-rustfmt
79+
name: cargo-rustfmt
80+
language: system
81+
entry: cargo +nightly-2025-01-15 fmt --all -- --check
82+
stages: [pre-commit]
83+
pass_filenames: false

Cargo.lock

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

rust/operator-binary/src/backend/cert_manager.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@ use stackable_operator::{
1212
time::Duration,
1313
};
1414

15-
use crate::{
16-
crd::{self, CertificateKeyGeneration},
17-
external_crd::{self, cert_manager::CertificatePrivateKey},
18-
format::SecretData,
19-
utils::Unloggable,
20-
};
21-
2215
use super::{
2316
k8s_search::LABEL_SCOPE_NODE,
2417
pod_info::{Address, PodInfo, SchedulingPodInfo},
2518
scope::SecretScope,
2619
ScopeAddressesError, SecretBackend, SecretBackendError, SecretContents, SecretVolumeSelector,
2720
};
21+
use crate::{
22+
crd::{self, CertificateKeyGeneration},
23+
external_crd::{self, cert_manager::CertificatePrivateKey},
24+
format::SecretData,
25+
utils::Unloggable,
26+
};
2827

2928
/// Default lifetime of certs when no annotations are set on the Volume.
3029
pub const DEFAULT_CERT_LIFETIME: Duration = Duration::from_hours_unchecked(24);

rust/operator-binary/src/backend/dynamic.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ use async_trait::async_trait;
99
use snafu::{ResultExt, Snafu};
1010
use stackable_operator::kube::runtime::reflector::ObjectRef;
1111

12-
use crate::{
13-
crd::{self, SecretClass},
14-
utils::Unloggable,
15-
};
16-
1712
use super::{
1813
kerberos_keytab::{self, KerberosProfile},
1914
pod_info::{PodInfo, SchedulingPodInfo},
2015
tls, SecretBackend, SecretBackendError, SecretVolumeSelector,
2116
};
17+
use crate::{
18+
crd::{self, SecretClass},
19+
utils::Unloggable,
20+
};
2221

2322
pub struct DynError(Box<dyn SecretBackendError>);
2423

rust/operator-binary/src/backend/k8s_search.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ use stackable_operator::{
1212
kvp::{LabelError, LabelSelectorExt, Labels},
1313
};
1414

15-
use crate::{crd::SearchNamespace, format::SecretData, utils::Unloggable};
16-
1715
use super::{
1816
pod_info::{PodInfo, SchedulingPodInfo},
1917
scope::SecretScope,
2018
SecretBackend, SecretBackendError, SecretContents, SecretVolumeSelector,
2119
};
20+
use crate::{crd::SearchNamespace, format::SecretData, utils::Unloggable};
2221

2322
const LABEL_CLASS: &str = "secrets.stackable.tech/class";
2423
pub(super) const LABEL_SCOPE_NODE: &str = "secrets.stackable.tech/node";

rust/operator-binary/src/backend/kerberos_keytab.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ use tokio::{
1717
io::{AsyncReadExt, AsyncWriteExt},
1818
};
1919

20+
use super::{
21+
pod_info::Address, scope::SecretScope, ScopeAddressesError, SecretBackend, SecretBackendError,
22+
SecretContents,
23+
};
2024
use crate::{
2125
crd::{
2226
ActiveDirectorySamAccountNameRules, InvalidKerberosPrincipal, KerberosKeytabBackendAdmin,
@@ -26,11 +30,6 @@ use crate::{
2630
utils::Unloggable,
2731
};
2832

29-
use super::{
30-
pod_info::Address, scope::SecretScope, ScopeAddressesError, SecretBackend, SecretBackendError,
31-
SecretContents,
32-
};
33-
3433
#[derive(Debug, Snafu)]
3534
pub enum Error {
3635
#[snafu(display("failed to get addresses for scope {:?}", format!("{scope}")))]

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,24 @@ pub mod pod_info;
88
pub mod scope;
99
pub mod tls;
1010

11+
use std::{collections::HashSet, convert::Infallible, fmt::Debug};
12+
1113
use async_trait::async_trait;
14+
pub use cert_manager::CertManager;
15+
pub use k8s_search::K8sSearch;
16+
pub use kerberos_keytab::KerberosKeytab;
17+
use pod_info::Address;
18+
use scope::SecretScope;
1219
use serde::{de::Unexpected, Deserialize, Deserializer, Serialize};
1320
use snafu::{OptionExt, Snafu};
1421
use stackable_operator::{
1522
k8s_openapi::chrono::{DateTime, FixedOffset},
1623
time::Duration,
1724
};
18-
use std::{collections::HashSet, convert::Infallible, fmt::Debug};
19-
20-
pub use cert_manager::CertManager;
21-
pub use k8s_search::K8sSearch;
22-
pub use kerberos_keytab::KerberosKeytab;
2325
pub use tls::TlsGenerate;
2426

25-
use pod_info::Address;
26-
use scope::SecretScope;
27-
28-
use crate::format::{SecretData, SecretFormat};
29-
3027
use self::pod_info::SchedulingPodInfo;
28+
use crate::format::{SecretData, SecretFormat};
3129

3230
/// Configuration provided by the `Volume` selecting what secret data should be provided
3331
///

rust/operator-binary/src/backend/pod_info.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ use stackable_operator::{
1616
kube::runtime::reflector::ObjectRef,
1717
};
1818

19-
use crate::utils::trystream_any;
20-
2119
use super::scope::SecretScope;
20+
use crate::utils::trystream_any;
2221

2322
const LISTENER_PVC_ANNOTATION_LISTENER_NAME: &str = "listeners.stackable.tech/listener-name";
2423
const LISTENER_PVC_ANNOTATION_LISTENER_CLASS: &str = "listeners.stackable.tech/listener-class";

rust/operator-binary/src/backend/tls/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ use stackable_operator::{
2727
};
2828
use time::OffsetDateTime;
2929

30-
use crate::{
31-
crd::{self, CertificateKeyGeneration},
32-
format::{well_known, SecretData, WellKnownSecretData},
33-
utils::iterator_try_concat_bytes,
34-
};
35-
3630
use super::{
3731
pod_info::{Address, PodInfo},
3832
scope::SecretScope,
3933
ScopeAddressesError, SecretBackend, SecretBackendError, SecretContents,
4034
};
35+
use crate::{
36+
crd::{self, CertificateKeyGeneration},
37+
format::{well_known, SecretData, WellKnownSecretData},
38+
utils::iterator_try_concat_bytes,
39+
};
4140

4241
mod ca;
4342

0 commit comments

Comments
 (0)