Use executor type as a delimiter to prevent deploy name conflict (#1009)
This commit is contained in:
@@ -462,8 +462,11 @@ func (gp *GenericPool) specializePod(pod *apiv1.Pod, metadata *metav1.ObjectMeta
|
||||
}
|
||||
|
||||
func (gp *GenericPool) getPoolName() string {
|
||||
return strings.ToLower(fmt.Sprintf("poolmgr-%v-%v-%v",
|
||||
gp.env.Metadata.Name, gp.env.Metadata.Namespace, uniuri.NewLen(8)))
|
||||
// Use executor type as delimiter between function name and namespace to prevent deployment name conflict.
|
||||
// For example:
|
||||
// 1. fn-name: a-b fn-namespace: c => a-b-poolmgr-c
|
||||
// 2. fn-name: a fn-namespace: b-c => a-poolmgr-b-c
|
||||
return strings.ToLower(fmt.Sprintf("%v-poolmgr-%v", gp.env.Metadata.Name, gp.env.Metadata.Namespace))
|
||||
}
|
||||
|
||||
// A pool is a deployment of generic containers for an env. This
|
||||
|
||||
Reference in New Issue
Block a user