Skip to content

Commit 0908292

Browse files
authored
chore: Bump to operator-rs 0.113.0 (#715)
* chore: Bump to operator-rs 0.113.0 * Add testdata * regenerate * fix test assertion timeout
1 parent fa7e6cc commit 0908292

19 files changed

Lines changed: 2493 additions & 2401 deletions

File tree

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ edition = "2021"
1111
repository = "https://github.com/stackabletech/secret-operator"
1212

1313
[workspace.dependencies]
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", features = ["time", "crds", "webhook"] }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.113.0", features = ["time", "crds", "webhook"] }
1515
krb5 = { git = "https://github.com/stackabletech/krb5-rs.git", tag = "v0.1.0" }
1616

1717
anyhow = "1.0"
@@ -24,14 +24,13 @@ const_format = "0.2.34"
2424
futures = { version = "0.3", features = ["compat"] }
2525
h2 = "0.4"
2626
hex = "0.4"
27+
indoc = "2.0"
2728
# We can't use the stackable-operator re-export because we need the special "unstable-runtime-stream-control"
2829
# feature. We don't want to enable it in stackable-operator, as we don't want to accidentally use
2930
# unstable features.
3031
# This version needs to match the kube version that is re-exported by stackable-operator, so that
3132
# the feature unification works!
32-
kube-runtime = { git = "https://github.com/kube-rs/kube-rs", rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5", default-features = false, features = ["unstable-runtime-stream-control"] }
33-
# Hopefully soon we can switch to
34-
# kube-runtime = { version = "*", default-features = false, features = ["unstable-runtime-stream-control"] }
33+
kube-runtime = { version = "*", default-features = false, features = ["unstable-runtime-stream-control"] }
3534
ldap3 = { version = "0.12", default-features = false, features = ["gssapi", "tls"] }
3635
libc = "0.2"
3736
native-tls = "0.2"

crate-hashes.json

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

extra/crds.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
name: v1alpha2
1818
schema:
1919
openAPIV3Schema:
20-
description: Auto-generated derived type for SecretClassSpec via `CustomResource`
20+
description: A SecretClass is a cluster-global Kubernetes resource that defines a category of secrets that the Secret Operator knows how to provision.
2121
properties:
2222
spec:
2323
description: |-
@@ -444,7 +444,7 @@ spec:
444444
name: v1alpha1
445445
schema:
446446
openAPIV3Schema:
447-
description: Auto-generated derived type for SecretClassSpec via `CustomResource`
447+
description: A SecretClass is a cluster-global Kubernetes resource that defines a category of secrets that the Secret Operator knows how to provision.
448448
properties:
449449
spec:
450450
description: |-
@@ -886,7 +886,7 @@ spec:
886886
name: v1alpha1
887887
schema:
888888
openAPIV3Schema:
889-
description: Auto-generated derived type for TrustStoreSpec via `CustomResource`
889+
description: A TrustStore requests information about how to validate secrets issued by a SecretClass.
890890
properties:
891891
spec:
892892
description: |-

rust/cert-tools/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub enum CertInput {
107107
}
108108

109109
impl CertInput {
110-
pub fn from_file(&self) -> Result<Vec<X509>, CertInputError> {
110+
pub fn read_certificates(&self) -> Result<Vec<X509>, CertInputError> {
111111
let read_file_fn = |path| fs::read(path).context(ReadFileSnafu { path });
112112

113113
match self {

rust/cert-tools/src/cmds/pkcs12.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn generate_truststore(args: GeneratePkcs12TruststoreArguments) -> Result<()
4444
let certificate_sources = certificate_sources
4545
.iter()
4646
.map(|source| {
47-
let certificates_list = source.from_file().context(ReadCertificateSnafu {
47+
let certificates_list = source.read_certificates().context(ReadCertificateSnafu {
4848
path: source.path(),
4949
})?;
5050

rust/cert-tools/src/parsers/pkcs12.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub fn parse_file_workaround(
9393
password: &str,
9494
) -> Result<Vec<X509>, WorkaroundError> {
9595
let mut child = Command::new("openssl")
96-
.args(&[
96+
.args([
9797
"pkcs12",
9898
"-nokeys",
9999
"-password",

rust/krb5-provision-keytab/src/active_directory.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use crate::credential_cache::{self, CredentialCache};
2222
pub enum Error {
2323
#[snafu(display("failed to retrieve LDAP TLS CA {ca_ref}"))]
2424
GetLdapTlsCa {
25-
source: kube::Error,
25+
#[snafu(source(from(kube::Error, Box::new)))]
26+
source: Box<kube::Error>,
2627
ca_ref: ObjectRef<Secret>,
2728
},
2829

@@ -33,7 +34,10 @@ pub enum Error {
3334
ParseLdapTlsCa { source: native_tls::Error },
3435

3536
#[snafu(display("password cache error"))]
36-
PasswordCache { source: credential_cache::Error },
37+
PasswordCache {
38+
#[snafu(source(from(credential_cache::Error, Box::new)))]
39+
source: Box<credential_cache::Error>,
40+
},
3741

3842
#[snafu(display("failed to configure LDAP TLS"))]
3943
ConfigureLdapTls { source: native_tls::Error },
@@ -58,7 +62,8 @@ pub enum Error {
5862
link = "https://docs.stackable.tech/home/nightly/secret-operator/troubleshooting.html#active-directory-ldap-user-conflict"
5963
))]
6064
CreateLdapUserConflict {
61-
source: ldap3::LdapError,
65+
#[snafu(source(from(ldap3::LdapError, Box::new)))]
66+
source: Box<ldap3::LdapError>,
6267
password_cache_ref: ObjectRef<Secret>,
6368
},
6469

rust/krb5-provision-keytab/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ enum Error {
6969

7070
enum AdminConnection<'a> {
7171
Mit(mit::MitAdmin<'a>),
72-
ActiveDirectory(active_directory::AdAdmin<'a>),
72+
ActiveDirectory(Box<active_directory::AdAdmin<'a>>),
7373
}
7474

7575
async fn run() -> Result<Response, Error> {
@@ -95,7 +95,7 @@ async fn run() -> Result<Response, Error> {
9595
user_distinguished_name,
9696
schema_distinguished_name,
9797
generate_sam_account_name,
98-
} => AdminConnection::ActiveDirectory(
98+
} => AdminConnection::ActiveDirectory(Box::new(
9999
active_directory::AdAdmin::connect(
100100
&ldap_server,
101101
&krb,
@@ -107,7 +107,7 @@ async fn run() -> Result<Response, Error> {
107107
)
108108
.await
109109
.context(ActiveDirectoryInitSnafu)?,
110-
),
110+
)),
111111
};
112112
let mut kt = Keytab::resolve(
113113
&krb,

0 commit comments

Comments
 (0)