Skip to content

Commit

Permalink
chore: Upgrade to kube-rs 0.84.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Mikulicic committed Jul 24, 2023
1 parent 6cbdd57 commit a42635a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 51 deletions.
77 changes: 31 additions & 46 deletions Cargo.lock

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

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ description = "Copy k8s resources (or parts thereof) across clusters"
[dependencies]
clap = { version = "4.3", features = ["derive", "help", "env", "std"] }
futures = "0.3"
kube = { version = "0.80.0", features = ["runtime", "derive"] }
kube = { version = "0.83.0", features = ["runtime", "derive"] }
kube-derive = "0.84.0"
k8s-openapi = { version = "0.17.0", features = ["v1_26"] }
kubert = { version = "0.16.1", features = ["clap", "runtime", "server"] }
k8s-openapi = { version = "0.18.0", features = ["v1_26"] }
# We cannot bump kube-res past 0.82.0 until this PR is merged: https://github.com/olix0r/kubert/pull/163
# until then we can use this fork (mkm reviewed it and pinned the commit)
kubert = { git = "https://github.com/hawkw/kubert", features = ["clap", "runtime", "server"], rev="1c44765207c78aadb30b39138b2ee8d8c9ffa2c9" }
# kubert = { version = "0.16.1", features = ["clap", "runtime", "server"] }
tokio = { version = "1.26", features = ["full"] }
anyhow = { version = "1", features = ["backtrace"] }
tracing = "0.1"
Expand Down
7 changes: 5 additions & 2 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ use kube::{
api::{ListParams, Patch, PatchParams},
core::{DynamicObject, GroupVersionKind, ObjectMeta},
discovery::{self, ApiResource},
runtime::controller::{Action, Controller},
runtime::{
controller::{Action, Controller},
watcher,
},
Api, Client, Config, Resource, ResourceExt,
};
use serde_json::json;
Expand Down Expand Up @@ -321,7 +324,7 @@ pub async fn run(client: Client) -> Result<()> {
error!("CRD is not queryable; {e:?}. Is the CRD installed?");
std::process::exit(1);
}
Controller::new(docs, ListParams::default())
Controller::new(docs, watcher::Config::default().any_semantic())
.shutdown_on_signal()
.run(reconcile, error_policy, Arc::new(Context { client }))
.filter_map(|x| async move { std::result::Result::ok(x) })
Expand Down

0 comments on commit a42635a

Please sign in to comment.