removed the label in Target

This commit is contained in:
pb 2025-07-28 11:45:36 +02:00
parent 32ce1ef444
commit 53043e7781

View File

@ -324,9 +324,9 @@ func (k *KubernetesService) CreateAdmiraltyTarget(context context.Context, execu
"metadata": map[string]interface{}{
"name": targetName,
"namespace": executionId,
"labels": map[string]interface{}{
"peer": peerId,
},
// "labels": map[string]interface{}{
// "peer": peerId,
// },
},
"spec": map[string]interface{}{
"kubeconfigSecret": map[string]string{
@ -608,3 +608,12 @@ func (k *KubernetesService) CreateSecret(context context.Context, minioId string
return nil
}
// 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
}