Skip to content

Commit b10005f

Browse files
committed
deps: bump kube-rs to v3.0.0
Needs manual updates, #150 was incomplete. Signed-off-by: Jakob Naucke <[email protected]>
1 parent 2ea74dc commit b10005f

File tree

12 files changed

+64
-86
lines changed

12 files changed

+64
-86
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ compute-pcrs-lib = { git = "https://github.com/trusted-execution-clusters/comput
1919
env_logger = "0.11.8"
2020
http = "1.4.0"
2121
ignition-config = "0.5.0"
22-
k8s-openapi = { version = "0.26.1", features = ["v1_33", "schemars"] }
23-
kube = { version = "2.0.1", default-features = false, features = ["derive", "runtime", "openssl-tls"] }
22+
k8s-openapi = { version = "0.27.0", features = ["v1_33", "schemars"] }
23+
kube = { version = "3.0.0", default-features = false, features = ["derive", "runtime", "openssl-tls"] }
2424
log = "0.4.29"
2525
serde = { version = "1.0.228", features = ["derive"] }
2626
serde_json = "1.0.148"

compute-pcrs/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use anyhow::{Context, Result};
77
use clap::Parser;
88
use compute_pcrs_lib::*;
9-
use k8s_openapi::{api::core::v1::ConfigMap, chrono::Utc};
9+
use k8s_openapi::{api::core::v1::ConfigMap, jiff::Timestamp};
1010
use kube::{Api, Client};
1111

1212
use trusted_cluster_operator_lib::{conditions::INSTALLED_REASON, reference_values::*, *};
@@ -57,7 +57,7 @@ async fn main() -> Result<()> {
5757
let mut image_pcrs: ImagePcrs = serde_json::from_str(image_pcrs_str)?;
5858

5959
let image_pcr = ImagePcr {
60-
first_seen: Utc::now(),
60+
first_seen: Timestamp::now(),
6161
reference: args.image,
6262
pcrs,
6363
};

lib/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub mod reference_values;
88
mod kopium;
99
#[allow(clippy::all)]
1010
mod vendor_kopium;
11+
use k8s_openapi::jiff::Timestamp;
1112
pub use kopium::approvedimages::*;
1213
pub use kopium::attestationkeys::*;
1314
pub use kopium::machines::*;
@@ -17,7 +18,6 @@ pub use vendor_kopium::virtualmachines;
1718

1819
use conditions::*;
1920
use k8s_openapi::apimachinery::pkg::apis::meta::v1::{Condition, Time};
20-
use k8s_openapi::chrono::Utc;
2121

2222
#[macro_export]
2323
macro_rules! update_status {
@@ -50,7 +50,7 @@ pub fn committed_condition(reason: &str, generation: Option<i64>) -> Condition {
5050
_ => "",
5151
}
5252
.to_string(),
53-
last_transition_time: Time(Utc::now()),
53+
last_transition_time: Time(Timestamp::now()),
5454
observed_generation: generation,
5555
}
5656
}

lib/src/reference_values.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// SPDX-License-Identifier: MIT
55

66
use compute_pcrs_lib::Pcr;
7-
use k8s_openapi::chrono::{DateTime, Utc};
7+
use k8s_openapi::jiff::Timestamp;
88
use serde::{Deserialize, Serialize};
99
use std::collections::BTreeMap;
1010

@@ -13,7 +13,7 @@ pub const PCR_CONFIG_FILE: &str = "image-pcrs.json";
1313

1414
#[derive(Deserialize, Serialize)]
1515
pub struct ImagePcr {
16-
pub first_seen: DateTime<Utc>,
16+
pub first_seen: Timestamp,
1717
pub pcrs: Vec<Pcr>,
1818
pub reference: String,
1919
}

operator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rust-version.workspace = true
1111
[dependencies]
1212
anyhow.workspace = true
1313
base64 = "0.22.1"
14+
chrono = "0.4.42"
1415
clevis-pin-trustee-lib.workspace = true
1516
trusted-cluster-operator-lib = { path = "../lib" }
1617
compute-pcrs-lib.workspace = true

operator/src/conditions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SPDX-License-Identifier: MIT
44

55
use k8s_openapi::apimachinery::pkg::apis::meta::v1::{Condition, Time};
6-
use k8s_openapi::chrono::Utc;
6+
use k8s_openapi::jiff::Timestamp;
77
use trusted_cluster_operator_lib::{condition_status, conditions::*};
88

99
pub fn known_trustee_address_condition(known: bool, generation: Option<i64>) -> Condition {
@@ -18,7 +18,7 @@ pub fn known_trustee_address_condition(known: bool, generation: Option<i64>) ->
1818
status: condition_status(known),
1919
reason: reason.to_string(),
2020
message: message.to_string(),
21-
last_transition_time: Time(Utc::now()),
21+
last_transition_time: Time(Timestamp::now()),
2222
observed_generation: generation,
2323
}
2424
}
@@ -38,7 +38,7 @@ pub fn installed_condition(reason: &str, generation: Option<i64>) -> Condition {
3838
_ => "",
3939
}
4040
.to_string(),
41-
last_transition_time: Time(Utc::now()),
41+
last_transition_time: Time(Timestamp::now()),
4242
observed_generation: generation,
4343
}
4444
}
@@ -55,7 +55,7 @@ pub fn attestation_key_approved_condition(reason: &str, generation: Option<i64>)
5555
_ => "",
5656
}
5757
.to_string(),
58-
last_transition_time: Time(Utc::now()),
58+
last_transition_time: Time(Timestamp::now()),
5959
observed_generation: generation,
6060
}
6161
}

0 commit comments

Comments
 (0)