Skip to content

Commit 6cdf45d

Browse files
committed
Set default Docker image for Pulsar Dev Services
1 parent f0e074e commit 6cdf45d

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

build-parent/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
<apicurio-registry.image>quay.io/apicurio/apicurio-registry-mem:2.6.13.Final</apicurio-registry.image>
117117
<narayana-lra.image>quay.io/jbosstm/lra-coordinator:latest</narayana-lra.image>
118118
<rabbitmq.image>rabbitmq:3.12-management</rabbitmq.image>
119+
<pulsar.image>apachepulsar/pulsar:3.2.4</pulsar.image>
119120

120121
<!-- Code Coverage Properties-->
121122
<jacoco.agent.argLine></jacoco.agent.argLine>

docs/src/main/asciidoc/_attributes.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
:narayana-lra-image: ${narayana-lra.image}
2525
:mongo-image: ${mongo.image}
2626
:rabbitmq-image: ${rabbitmq.image}
27+
:pulsar-image: ${pulsar.image}
2728
:jandex-version: ${jandex.version}
2829
:jandex-gradle-plugin-version: ${jandex-gradle-plugin.version}
2930
:kotlin-version: ${kotlin.version}

docs/src/main/asciidoc/pulsar-getting-started.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,14 @@ Open `http://localhost:8080/quotes.html` in your browser and request some quotes
398398
When not running in dev or test mode, you will need to start your Pulsar broker.
399399
You can follow the instructions from the https://pulsar.apache.org/docs/3.0.x/getting-started-docker/[Run a standalone Pulsar cluster in Docker] or create a `docker-compose.yaml` file with the following content:
400400

401-
[source, yaml]
401+
[source, yaml ,subs=attributes+]
402402
----
403403
version: '3.8'
404404
405405
services:
406406
407407
pulsar:
408-
image: apachepulsar/pulsar:3.2.4
408+
image: {pulsar-image}
409409
command: [
410410
"sh", "-c",
411411
"bin/apply-config-from-env.py conf/standalone.conf && bin/pulsar standalone -nfw -nss"

extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/PulsarDevServicesBuildTimeConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.Map;
44
import java.util.Optional;
55

6+
import io.quarkus.runtime.annotations.ConfigDocDefault;
67
import io.quarkus.runtime.annotations.ConfigDocMapKey;
78
import io.quarkus.runtime.annotations.ConfigGroup;
89
import io.smallrye.config.WithDefault;
@@ -33,8 +34,8 @@ public interface PulsarDevServicesBuildTimeConfig {
3334
* Check https://hub.docker.com/r/apachepulsar/pulsar to find the available versions.
3435
*/
3536
// Alpine-based images starting from 3.3.0 fail to start on aarch64: https://github.com/apache/pulsar/issues/23306
36-
@WithDefault("apachepulsar/pulsar:3.2.4")
37-
String imageName();
37+
@ConfigDocDefault(value = "`{pulsar-image}`", escape = false)
38+
Optional<String> imageName();
3839

3940
/**
4041
* Indicates if the Pulsar broker managed by Quarkus Dev Services is shared.

extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/PulsarDevServicesProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.quarkus.smallrye.reactivemessaging.pulsar.deployment;
22

3+
import static io.quarkus.devservices.common.ConfigureUtil.getDefaultImageNameFor;
34
import static io.quarkus.devservices.common.ContainerLocator.locateContainerWithLabels;
45
import static io.quarkus.devservices.common.Labels.QUARKUS_DEV_SERVICE;
56

@@ -276,7 +277,7 @@ private static final class PulsarDevServiceCfg {
276277

277278
public PulsarDevServiceCfg(PulsarDevServicesBuildTimeConfig devServicesConfig) {
278279
this.devServicesEnabled = devServicesConfig.enabled().orElse(true);
279-
this.imageName = devServicesConfig.imageName();
280+
this.imageName = devServicesConfig.imageName().orElseGet(() -> getDefaultImageNameFor("pulsar"));
280281
this.fixedExposedPort = devServicesConfig.port().orElse(0);
281282
this.shared = devServicesConfig.shared();
282283
this.serviceName = devServicesConfig.serviceName();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default.image=${pulsar.image}

0 commit comments

Comments
 (0)