Skip to main content

namespace_for

Function namespace_for 

Source
pub fn namespace_for(project: &str, export: Option<&ExportConfig>) -> String
Expand description

Returns the Kubernetes namespace to use for the export.

If the manifest export.kubernetes.namespace override is set, it is used as-is. Otherwise the project name is returned as the default namespace.

use lightshuttle_export::resolve::namespace_for;

assert_eq!(namespace_for("my-project", None), "my-project");