added a new method to create kubernetes names with the same naming
This commit is contained in:
		@@ -597,3 +597,15 @@ func (l *LibData) ToPurchasedResource() *purchase_resource.PurchaseResource {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ============== ADMIRALTY ==============
 | 
				
			||||||
 | 
					// Returns a concatenation of the peerId and namespace in order for
 | 
				
			||||||
 | 
					// kubernetes ressources to have a unique name, under 63 characters
 | 
				
			||||||
 | 
					// and yet identify which peer they are created for
 | 
				
			||||||
 | 
					func GetConcatenatedName(peerId string, namespace string) string {
 | 
				
			||||||
 | 
						s := strings.Split(namespace, "-")[:2]
 | 
				
			||||||
 | 
						n := s[0] + "-" + s[1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return peerId + "-" + n
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user