From b7507bfd90343547c53a593fb06318c62f1c4979 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Wed, 8 Nov 2023 17:34:48 +0200 Subject: [PATCH] fix reference and some extra documentation --- Dockerfile.cridge | 2 +- .../osl/cridge/KubernetesClientResource.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile.cridge b/Dockerfile.cridge index 71e8ca9..5732826 100644 --- a/Dockerfile.cridge +++ b/Dockerfile.cridge @@ -2,5 +2,5 @@ FROM ibm-semeru-runtimes:open-17.0.7_7-jdk MAINTAINER openslice.io RUN mkdir /opt/shareclasses RUN mkdir -p /opt/openslice/lib/ -COPY target/org.etsi.osl.tmf.api-1.2.0-SNAPSHOT-exec.jar /opt/openslice/lib/ +COPY target/org.etsi.osl.cridge-1.2.0-SNAPSHOT-exec.jar /opt/openslice/lib/ CMD ["java", "-Xshareclasses:cacheDir=/opt/shareclasses", "-jar", "/opt/openslice/lib/org.etsi.osl.cridge-1.2.0-SNAPSHOT-exec.jar"] diff --git a/src/main/java/org/etsi/osl/cridge/KubernetesClientResource.java b/src/main/java/org/etsi/osl/cridge/KubernetesClientResource.java index 98b98e1..88a9912 100644 --- a/src/main/java/org/etsi/osl/cridge/KubernetesClientResource.java +++ b/src/main/java/org/etsi/osl/cridge/KubernetesClientResource.java @@ -412,22 +412,22 @@ public class KubernetesClientResource { logger.debug("============ Deploy crspec =============" ); - logger.debug("Check if this CRIDGE instance is related to this deployment" ); + logger.debug("Check if this CRIDGE instance is related to this kubernets cluster context" ); if ( (headers.get("currentContextCluster") ==null) || - ( ! headers.get("currentContextCluster").equals( kubernetesContextDefinition.getCurrentContextCluster() ))) { + (headers.get("clusterMasterURL") ==null) || + ( ! headers.get("currentContextCluster").equals( kubernetesContextDefinition.getCurrentContextCluster() )) || + ( ! headers.get("clusterMasterURL").equals( kubernetesContextDefinition.getMasterURL() ))) { - logger.debug("Will return SEE OTHER header={}, this.context= {}", headers.get("currentContextCluster"), kubernetesContextDefinition.getCurrentContextCluster() ); + logger.debug("Will return SEE OTHER header.currentContextCluster={}, this.context= {} header.clusterMasterURLclusterMasterURL={}, this.context= {}", + headers.get("currentContextCluster"), + kubernetesContextDefinition.getCurrentContextCluster(), + headers.get("clusterMasterURL"), + kubernetesContextDefinition.getMasterURL() ); return "SEE OTHER"; } - if ( (headers.get("clusterMasterURL") ==null) || - ( ! headers.get("clusterMasterURL").equals( kubernetesContextDefinition.getMasterURL() ))) { - logger.debug("Will return SEE OTHER header={}, this.context= {}", headers.get("clusterMasterURL"), kubernetesContextDefinition.getMasterURL() ); - return "SEE OTHER"; - - } logger.debug("Deploy the following CR:" ); logger.debug("{}", crspec ); -- GitLab