Repository: quarkusio/quarkus
Issue: Regression - Unable to build native binary when using quarkus-kafka-client extension

### Describe the bug

See https://github.com/quarkusio/quarkus/issues/32968.
Steps to reproduce are the same.

Root cause differs for  released Quarkus versions and snapshot:
- `3.0.2.Final` / `3.0.3.Final` / `3.0.4.Final` / `3.1.0.CR1`
```
Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: io.quarkus.kafka.client.runtime.ui.KafkaUiUtils.<init>(io.quarkus.kafka.client.runtime.KafkaAdminClient, io.quarkus.kafka.client.runtime.ui.KafkaTopicClient, java.util.Map). This error is reported at image build time because class io.quarkus.kafka.client.runtime.ui.KafkaUiUtils_Bean is registered for linking at image build time by command line
```
- `999-SNAPSHOT` (2023-05-25)
```
Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.netty.util.internal.logging.Log4J2Logger. This error is reported at image build time because class io.netty.util.internal.logging.Log4J2LoggerFactory is registered for linking at image build time by command line
```

See attached logs:
[kafka-client-3-0-2-final.log](https://github.com/quarkusio/quarkus/files/11572911/kafka-client-3-0-2-final.log)
[kafka-client-3-0-3-final.log](https://github.com/quarkusio/quarkus/files/11572912/kafka-client-3-0-3-final.log)
[kafka-client-3-0-4-final.log](https://github.com/quarkusio/quarkus/files/11572913/kafka-client-3-0-4-final.log)
[kafka-client-3-1-0-cr1.log](https://github.com/quarkusio/quarkus/files/11572914/kafka-client-3-1-0-cr1.log)
[kafka-client-999-snapshot.log](https://github.com/quarkusio/quarkus/files/11572915/kafka-client-999-snapshot.log)



### Expected behavior

_No response_

### Actual behavior

_No response_

### How to Reproduce?

[code-with-quarkus.zip](https://github.com/quarkusio/quarkus/files/11575553/code-with-quarkus.zip)

unzip && cd && mvn clean verify -Dnative

Alternative reproducer for `999-SNAPSHOT`:
[code-with-quarkus_999-SNAPSHOT.zip](https://github.com/quarkusio/quarkus/files/11611945/code-with-quarkus_999-SNAPSHOT.zip)

### Output of `uname -a` or `ver`

Linux 6.2.15-200.fc37.x86_64

### Output of `java -version`

openjdk 17.0.7 2023-04-18

### GraalVM version (if different from Java)

GraalVM 22.3.2.1-Final Java 17 Mandrel Distribution

### Quarkus version or git rev

3.0.2.Final, 3.0.3.Final, 3.0.4.Final, 3.1.0.CR1, 999-SNAPSHOT (2023-05-25)

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

3.8.6

### Additional information

_No response_

Changed files:
extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java

diff --git a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java
index 2c8f91193f6..d2ced26b180 100644
--- a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java
+++ b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java
@@ -539,12 +539,19 @@ void registerServiceBinding(Capabilities capabilities,
         }
     }
 
+    @BuildStep
+    public AdditionalBeanBuildItem kafkaAdmin() {
+        return AdditionalBeanBuildItem.builder()
+                .addBeanClass(KafkaAdminClient.class)
+                .setUnremovable()
+                .build();
+    }
+
     // Kafka UI related stuff
 
-    @BuildStep
+    @BuildStep(onlyIf = IsDevelopment.class)
     public AdditionalBeanBuildItem kafkaClientBeans() {
         return AdditionalBeanBuildItem.builder()
-                .addBeanClass(KafkaAdminClient.class)
                 .addBeanClass(KafkaTopicClient.class)
                 .addBeanClass(KafkaUiUtils.class)
                 .setUnremovable()