removed the label in Target
This commit is contained in:
parent
32ce1ef444
commit
53043e7781
@ -324,9 +324,9 @@ func (k *KubernetesService) CreateAdmiraltyTarget(context context.Context, execu
|
|||||||
"metadata": map[string]interface{}{
|
"metadata": map[string]interface{}{
|
||||||
"name": targetName,
|
"name": targetName,
|
||||||
"namespace": executionId,
|
"namespace": executionId,
|
||||||
"labels": map[string]interface{}{
|
// "labels": map[string]interface{}{
|
||||||
"peer": peerId,
|
// "peer": peerId,
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
"spec": map[string]interface{}{
|
"spec": map[string]interface{}{
|
||||||
"kubeconfigSecret": map[string]string{
|
"kubeconfigSecret": map[string]string{
|
||||||
@ -608,3 +608,12 @@ func (k *KubernetesService) CreateSecret(context context.Context, minioId string
|
|||||||
return nil
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user