nebulous 0.1.86

A globally distributed container orchestrator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::models::V1UserProfile;

pub fn resolve_namespace(namespace: &str, user_profile: &V1UserProfile) -> String {
    if namespace == "-" {
        user_profile.handle.clone().unwrap_or(
            user_profile
                .email
                .clone()
                .replace("@", "-")
                .replace(".", "-"),
        )
    } else {
        namespace.to_string()
    }
}