Skip to content

Commit

Permalink
Merge pull request #480 from gthao313/integ-monitor
Browse files Browse the repository at this point in the history
[integ-monitor] add namespace value to integration test
  • Loading branch information
gthao313 committed Jul 10, 2023
2 parents 7123a15 + bcf8055 commit 1df7f55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integ/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const AMI_ARCH: &str = "x86_64";
// The default name for the nodegroup
const NODEGROUP_NAME: &str = "brupop-integ-test-nodegroup";

const NAMESPACE: &str = "brupop-bottlerocket-aws";

const WAIT_CERT_MANAGER_COMPLETE: tokio::time::Duration = tokio::time::Duration::from_secs(90);

lazy_static! {
Expand Down Expand Up @@ -218,13 +220,11 @@ async fn run() -> Result<()> {
.await
.context(error::LoadKubeConfigSnafu)?;

// infer the default namespace from the loaded kubeconfig
let namespace = config.default_namespace.to_string();
let k8s_client =
kube::client::Client::try_from(config).context(error::CreateK8sClientSnafu)?;

info!("monitoring brupop");
let monitor_client = BrupopMonitor::new(IntegBrupopClient::new(k8s_client, &namespace));
let monitor_client = BrupopMonitor::new(IntegBrupopClient::new(k8s_client, NAMESPACE));
monitor_client
.run_monitor()
.await
Expand Down
1 change: 1 addition & 0 deletions integ/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl BrupopClient for IntegBrupopClient {
async fn fetch_shadows(&self) -> Result<ObjectList<BottlerocketShadow>> {
let brss: Api<BottlerocketShadow> =
Api::namespaced(self.k8s_client.clone(), &self.namespace);

let brss_object_list = brss
.list(&ListParams::default())
.await
Expand Down

0 comments on commit 1df7f55

Please sign in to comment.