diff --git a/Dockerfile.cridge b/Dockerfile.cridge index 71e8ca99e949f3c43764185b0dcf271d2c960ac3..5732826b130ce2b32c4e7512c3b8b5e5782d823d 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 98b98e1a8fa7392e0448c78225c47272f4aaf91e..88a9912ee01702edcf6af2ab17f4a164f8afc2c9 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 );