Skip to main content

GetNamespaceName

Returns a Kubernetes namespace name by replacing placeholders in a user-defined template with provided organization, project, and domain values.

def GetNamespaceName(
template: string,
org: string,
project: string,
domain: string
) - > string

Returns a Kubernetes namespace name by replacing placeholders in a user-defined template with provided organization, project, and domain names. This function allows for dynamic generation of namespace names based on configuration.

Parameters

NameTypeDescription
templatestringThe template string containing placeholders (e.g., 'orgTemplate', 'projectTemplate', 'domainTemplate') that will be replaced.
orgstringThe organization name to be used for replacing the 'orgTemplate' placeholder in the template.
projectstringThe project name to be used for replacing the 'projectTemplate' placeholder in the template.
domainstringThe domain name to be used for replacing the 'domainTemplate' placeholder in the template.

Returns

TypeDescription
stringThe formatted Kubernetes namespace name with placeholders replaced.