From 0984f35fd7b5b5469fa8c96cc6c01982a33d43ff Mon Sep 17 00:00:00 2001 From: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:16:19 -0400 Subject: [PATCH] chore(discovery): rename discovery config properties (#31) --- pom.xml | 2 +- smoketest/compose/cryostat.yml | 4 ++-- src/main/java/io/cryostat/discovery/JDPDiscovery.java | 2 +- src/main/java/io/cryostat/discovery/PodmanDiscovery.java | 2 +- src/main/resources/application-dev.properties | 4 ++-- src/main/resources/application-test.properties | 4 ++-- src/main/resources/application.properties | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index e37fb8f04..8d5aaf611 100644 --- a/pom.xml +++ b/pom.xml @@ -200,7 +200,7 @@ - -Dcryostat.jdp.enabled=true -Dcryostat.podman.enabled=true -XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false + -Dcryostat.discovery.jdp.enabled=true -Dcryostat.discovery.podman.enabled=true -XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false diff --git a/smoketest/compose/cryostat.yml b/smoketest/compose/cryostat.yml index 8ea3df0ce..1de2884f1 100644 --- a/smoketest/compose/cryostat.yml +++ b/smoketest/compose/cryostat.yml @@ -24,8 +24,8 @@ services: io.cryostat.jmxPort: "0" io.cryostat.jmxUrl: "service:jmx:rmi:///jndi/rmi://localhost:0/jmxrmi" environment: - CRYOSTAT_PODMAN_ENABLED: "true" - CRYOSTAT_JDP_ENABLED: "true" + CRYOSTAT_DISCOVERY_PODMAN_ENABLED: "true" + CRYOSTAT_DISCOVERY_JDP_ENABLED: "true" JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false" restart: unless-stopped healthcheck: diff --git a/src/main/java/io/cryostat/discovery/JDPDiscovery.java b/src/main/java/io/cryostat/discovery/JDPDiscovery.java index e1cc4ff94..066250608 100644 --- a/src/main/java/io/cryostat/discovery/JDPDiscovery.java +++ b/src/main/java/io/cryostat/discovery/JDPDiscovery.java @@ -80,7 +80,7 @@ static JvmDiscoveryClient produceJvmDiscoveryClient() { @Inject JvmDiscoveryClient jdp; @Inject Vertx vertx; - @ConfigProperty(name = "cryostat.jdp.enabled") + @ConfigProperty(name = "cryostat.discovery.jdp.enabled") boolean enabled; @Transactional diff --git a/src/main/java/io/cryostat/discovery/PodmanDiscovery.java b/src/main/java/io/cryostat/discovery/PodmanDiscovery.java index 169c6f930..1b5cc8276 100644 --- a/src/main/java/io/cryostat/discovery/PodmanDiscovery.java +++ b/src/main/java/io/cryostat/discovery/PodmanDiscovery.java @@ -101,7 +101,7 @@ public class PodmanDiscovery { @Inject JFRConnectionToolkit connectionToolkit; @Inject ObjectMapper mapper; - @ConfigProperty(name = "cryostat.podman.enabled") + @ConfigProperty(name = "cryostat.discovery.podman.enabled") boolean enabled; @Transactional diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index e8a8f916c..467d5233f 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -15,5 +15,5 @@ quarkus.http.cors.exposed-headers=X-JMX-Authorization,X-JMX-Authenticate,X-WWW-A quarkus.hibernate-orm.database.generation=drop-and-create quarkus.hibernate-orm.log.sql=true -cryostat.jdp.enabled=true -cryostat.podman.enabled=true \ No newline at end of file +cryostat.discovery.jdp.enabled=true +cryostat.discovery.podman.enabled=true \ No newline at end of file diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 625bce0c9..3c39b7fca 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -1,5 +1,5 @@ quarkus.smallrye-openapi.info-title=Cryostat API (test) -cryostat.jdp.enabled=true -cryostat.podman.enabled=true +cryostat.discovery.jdp.enabled=true +cryostat.discovery.podman.enabled=true cryostat.auth.disabled=true diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1b1a365f0..1e79ed036 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,6 @@ quarkus.naming.enable-jndi=true -cryostat.jdp.enabled=false -cryostat.podman.enabled=false +cryostat.discovery.jdp.enabled=false +cryostat.discovery.podman.enabled=false quarkus.test.integration-test-profile=test