diff --git a/ozhera-operator/ozhera-operator-server/Dockerfile b/ozhera-operator/ozhera-operator-server/Dockerfile index adf39a89..2f7260da 100644 --- a/ozhera-operator/ozhera-operator-server/Dockerfile +++ b/ozhera-operator/ozhera-operator-server/Dockerfile @@ -14,6 +14,6 @@ # limitations under the License. FROM openjdk:21-jdk-bookworm -COPY ./target/ozhera-operator-server-1.0-jdk21.jar /home/work/ozhera-operator-server-1.0-SNAPSHOT.jar +COPY ./target/ozhera-operator-server-2.0.0-SNAPSHOT.jar /home/work/ozhera-operator-server-1.0-SNAPSHOT.jar -ENTRYPOINT ["sh","-c","java -XX:+UseZGC --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/sun.reflect=ALL-UNNAMED --add-opens java.base/java.xml=ALL-UNNAMED --add-exports java.base/sun.reflect.annotation=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports java.xml/com.sun.org.apache.xerces.internal.impl.dv.util=ALL-UNNAMED -Duser.timezone=Asia/Shanghai -jar /home/work/ozhera-operator-server-1.0-SNAPSHOT.jar"] \ No newline at end of file +ENTRYPOINT ["sh","-c","java -XX:+UseZGC --enable-preview --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/sun.reflect=ALL-UNNAMED --add-opens java.base/java.xml=ALL-UNNAMED --add-exports java.base/sun.reflect.annotation=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports java.xml/com.sun.org.apache.xerces.internal.impl.dv.util=ALL-UNNAMED -Duser.timezone=Asia/Shanghai -jar /home/work/ozhera-operator-server-1.0-SNAPSHOT.jar"] \ No newline at end of file diff --git a/ozhera-operator/ozhera-operator-server/pom.xml b/ozhera-operator/ozhera-operator-server/pom.xml index a11707c0..c67902d7 100644 --- a/ozhera-operator/ozhera-operator-server/pom.xml +++ b/ozhera-operator/ozhera-operator-server/pom.xml @@ -60,6 +60,16 @@ http://www.apache.org/licenses/LICENSE-2.0 + + + + org.yaml + snakeyaml + 1.33 + + + + diff --git a/ozhera-operator/ozhera-operator-server/src/main/resources/config.properties b/ozhera-operator/ozhera-operator-server/src/main/resources/config.properties index a4cddeee..ec22e4c6 100644 --- a/ozhera-operator/ozhera-operator-server/src/main/resources/config.properties +++ b/ozhera-operator/ozhera-operator-server/src/main/resources/config.properties @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. log.path=/home/work/log/ozhera-operator -crd=mone:run.mone.hera.operator.bo.HeraBootstrap:run.mone.hera.operator.bo.HeraBootstrapList:heraClient:HeraResourceEventHandler \ No newline at end of file +crd=mone:org.apache.ozhera.operator.bo.HeraBootstrap:org.apache.ozhera.operator.bo.HeraBootstrapList:heraClient:HeraResourceEventHandler \ No newline at end of file diff --git a/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/alertManager/ozhera_alertmanager.yaml b/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/alertManager/ozhera_alertmanager.yaml index af123efe..e1196233 100644 --- a/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/alertManager/ozhera_alertmanager.yaml +++ b/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/alertManager/ozhera_alertmanager.yaml @@ -96,7 +96,7 @@ spec: persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: - path: /home/work/alertmanager_hera_namespace_pv + path: /home/work/alertmanager_ozhera_namespace_pv nodeAffinity: required: nodeSelectorTerms: diff --git a/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/grafana/ozhera_grafana.yaml b/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/grafana/ozhera_grafana.yaml index edcab415..7f2b9b4b 100644 --- a/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/grafana/ozhera_grafana.yaml +++ b/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/grafana/ozhera_grafana.yaml @@ -1656,7 +1656,7 @@ spec: persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: - path: /home/work/grafana_hera_namespace_pv + path: /home/work/grafana_ozhera_namespace_pv nodeAffinity: required: nodeSelectorTerms: diff --git a/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/prometheus/ozhera_prometheus.yaml b/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/prometheus/ozhera_prometheus.yaml index ddcdd7f1..98cc5fe9 100644 --- a/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/prometheus/ozhera_prometheus.yaml +++ b/ozhera-operator/ozhera-operator-server/src/main/resources/ozhera_init/prometheus/ozhera_prometheus.yaml @@ -80,7 +80,7 @@ spec: persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: - path: /home/work/prometheus_hera_namespace_pv + path: /home/work/prometheus_ozhera_namespace_pv nodeAffinity: required: nodeSelectorTerms: diff --git a/ozhera-operator/ozhera-operator-service/src/main/java/org/apache/ozhera/operator/handler/HeraResourceEventHandler.java b/ozhera-operator/ozhera-operator-service/src/main/java/org/apache/ozhera/operator/handler/HeraResourceEventHandler.java index 3c594350..538d7231 100644 --- a/ozhera-operator/ozhera-operator-service/src/main/java/org/apache/ozhera/operator/handler/HeraResourceEventHandler.java +++ b/ozhera-operator/ozhera-operator-service/src/main/java/org/apache/ozhera/operator/handler/HeraResourceEventHandler.java @@ -251,8 +251,9 @@ private void initTpc(String action) { } } - private void initNacos(String action, String nacosAddress, String pwd, List propConfList) { + private void initNacos(String action, String nacosAddress, String pwd, List propConfList) throws InterruptedException { log.warn("initNacos begin nacosAddress:{}", nacosAddress); + Thread.sleep(1000 * 30); String url = String.format("http://%s/nacos/v1/ns/cluster/enable?level=4&pwd=%s", nacosAddress, pwd); String nacosEnable = HttpClientV6.get(url, new HashMap<>(), 2000); if (!"ok".equals(nacosEnable)) {