diff --git a/modules/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java b/modules/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java index 558e839ad..146718fc9 100644 --- a/modules/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java +++ b/modules/framework-k8s/src/main/java/it/smartcommunitylabdhub/framework/k8s/infrastructure/k8s/K8sBaseFramework.java @@ -11,6 +11,7 @@ import io.kubernetes.client.openapi.models.V1Toleration; import io.kubernetes.client.openapi.models.V1Volume; import io.kubernetes.client.openapi.models.V1VolumeMount; +import it.smartcommunitylabdhub.commons.config.ApplicationProperties; import it.smartcommunitylabdhub.commons.infrastructure.Framework; import it.smartcommunitylabdhub.commons.models.enums.State; import it.smartcommunitylabdhub.framework.k8s.exceptions.K8sFrameworkException; @@ -42,6 +43,8 @@ public abstract class K8sBaseFramework buildLabels(T runnable) { // Create labels for job Map labels = Map.of( "app.kubernetes.io/instance", - "dhcore-" + runnable.getId(), + applicationProperties.getName() + "-" + runnable.getId(), "app.kubernetes.io/version", runnable.getId(), "app.kubernetes.io/part-of", - "dhcore-" + runnable.getFramework() + "-" + runnable.getId(), + "dhcore-" + runnable.getProject() + "-" + runnable.getId(), "app.kubernetes.io/managed-by", - "dhcore" + applicationProperties.getName() + "-" + applicationProperties.getVersion() ); if (runnable.getLabels() != null && !runnable.getLabels().isEmpty()) { labels = new HashMap<>(labels);