Skip to content

Commit

Permalink
chore: add auth file
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Jul 15, 2024
1 parent f1f7cf6 commit 1cd32a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/domain/projects/create.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use anyhow::{bail, Result};
use k8s_openapi::api::core::v1::Namespace;
use kube::ResourceExt;
use std::sync::Arc;
use tracing::info;
Expand Down Expand Up @@ -36,17 +35,18 @@ pub async fn create_resource(cluster: Arc<dyn ProjectCluster>, project: Project)
bail!("namespace alread exist")
}

let ns: Namespace = project.into();
cluster.create(&ns).await?;
let namespace = project.into();
cluster.create(&namespace).await?;

//TODO: create event to update cache
info!(namespace = ns.name_any(), "new namespace created");
info!(namespace = namespace.name_any(), "new namespace created");

Ok(())
}

#[cfg(test)]
mod tests {
use k8s_openapi::api::core::v1::Namespace;
use mockall::mock;

use super::*;
Expand Down
Empty file added src/domain/users/auth.rs
Empty file.

0 comments on commit 1cd32a3

Please sign in to comment.