Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 37 additions & 62 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ compute-pcrs-lib = { git = "https://github.com/trusted-execution-clusters/comput
env_logger = "0.11.8"
http = "1.4.0"
ignition-config = "0.5.0"
k8s-openapi = { version = "0.26.1", features = ["v1_33", "schemars"] }
kube = { version = "2.0.1", default-features = false, features = ["derive", "runtime", "openssl-tls"] }
k8s-openapi = { version = "0.27.0", features = ["v1_33", "schemars"] }
kube = { version = "3.0.0", default-features = false, features = ["derive", "runtime", "openssl-tls"] }
log = "0.4.29"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.148"
Expand Down
4 changes: 2 additions & 2 deletions compute-pcrs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use anyhow::{Context, Result};
use clap::Parser;
use compute_pcrs_lib::*;
use k8s_openapi::{api::core::v1::ConfigMap, chrono::Utc};
use k8s_openapi::{api::core::v1::ConfigMap, jiff::Timestamp};
use kube::{Api, Client};

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

let image_pcr = ImagePcr {
first_seen: Utc::now(),
first_seen: Timestamp::now(),
reference: args.image,
pcrs,
};
Expand Down
4 changes: 2 additions & 2 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub mod reference_values;
mod kopium;
#[allow(clippy::all)]
mod vendor_kopium;
use k8s_openapi::jiff::Timestamp;
pub use kopium::approvedimages::*;
pub use kopium::attestationkeys::*;
pub use kopium::machines::*;
Expand All @@ -17,7 +18,6 @@ pub use vendor_kopium::virtualmachines;

use conditions::*;
use k8s_openapi::apimachinery::pkg::apis::meta::v1::{Condition, Time};
use k8s_openapi::chrono::Utc;

#[macro_export]
macro_rules! update_status {
Expand Down Expand Up @@ -50,7 +50,7 @@ pub fn committed_condition(reason: &str, generation: Option<i64>) -> Condition {
_ => "",
}
.to_string(),
last_transition_time: Time(Utc::now()),
last_transition_time: Time(Timestamp::now()),
observed_generation: generation,
}
}
4 changes: 2 additions & 2 deletions lib/src/reference_values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// SPDX-License-Identifier: MIT

use compute_pcrs_lib::Pcr;
use k8s_openapi::chrono::{DateTime, Utc};
use k8s_openapi::jiff::Timestamp;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;

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

#[derive(Deserialize, Serialize)]
pub struct ImagePcr {
pub first_seen: DateTime<Utc>,
pub first_seen: Timestamp,
pub pcrs: Vec<Pcr>,
pub reference: String,
}
Expand Down
1 change: 1 addition & 0 deletions operator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rust-version.workspace = true
[dependencies]
anyhow.workspace = true
base64 = "0.22.1"
chrono = "0.4.42"
clevis-pin-trustee-lib.workspace = true
trusted-cluster-operator-lib = { path = "../lib" }
compute-pcrs-lib.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions operator/src/conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: MIT

use k8s_openapi::apimachinery::pkg::apis::meta::v1::{Condition, Time};
use k8s_openapi::chrono::Utc;
use k8s_openapi::jiff::Timestamp;
use trusted_cluster_operator_lib::{condition_status, conditions::*};

pub fn known_trustee_address_condition(known: bool, generation: Option<i64>) -> Condition {
Expand All @@ -18,7 +18,7 @@ pub fn known_trustee_address_condition(known: bool, generation: Option<i64>) ->
status: condition_status(known),
reason: reason.to_string(),
message: message.to_string(),
last_transition_time: Time(Utc::now()),
last_transition_time: Time(Timestamp::now()),
observed_generation: generation,
}
}
Expand All @@ -38,7 +38,7 @@ pub fn installed_condition(reason: &str, generation: Option<i64>) -> Condition {
_ => "",
}
.to_string(),
last_transition_time: Time(Utc::now()),
last_transition_time: Time(Timestamp::now()),
observed_generation: generation,
}
}
Expand All @@ -55,7 +55,7 @@ pub fn attestation_key_approved_condition(reason: &str, generation: Option<i64>)
_ => "",
}
.to_string(),
last_transition_time: Time(Utc::now()),
last_transition_time: Time(Timestamp::now()),
observed_generation: generation,
}
}
Loading
Loading