Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Working towards Quarkus
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Jul 1, 2020
1 parent dd5e515 commit 1a7abab
Show file tree
Hide file tree
Showing 135 changed files with 1,356 additions and 505 deletions.
8 changes: 8 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ ifeq ($(MAVEN_BATCH),true)
MAVEN_ARGS+=-B
endif

ifneq (, $(shell which podman))
QUARKUS_CONTAINER_RUNTIME=podman
else ifneq (, $(shell which docker))
QUARKUS_CONTAINER_RUNTIME=docker
else
$(error "No container runtime found for native Quarkus build. You need either 'podman' or 'docker')
endif

all: init build test package

init:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.java.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ else
endif

package_java:
$(IMAGE_ENV) IMAGE_ENV="$(IMAGE_ENV)" mvn package -DskipTests $(MAVEN_ARGS)
$(IMAGE_ENV) IMAGE_ENV="$(IMAGE_ENV)" mvn package -DskipTests $(MAVEN_ARGS) $(MAVEN_PACKAGE_ARGS)

package: package_java
endif
Expand Down
17 changes: 17 additions & 0 deletions api-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down Expand Up @@ -166,6 +170,19 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<!-- we need the jandex index for quarkus to process our CRDs -->
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io.fabric8.kubernetes.api.model.Doneable;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -28,6 +29,7 @@
prefix = "Doneable",
value = "done"))
@SuppressWarnings("serial")
@RegisterForReflection
public abstract class AbstractHasMetadata<T> extends AbstractResource<T> implements HasMetadata {

@FunctionalInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
import io.fabric8.kubernetes.api.model.ListMeta;
import io.quarkus.runtime.annotations.RegisterForReflection;

@SuppressWarnings("serial")
@RegisterForReflection
public abstract class AbstractList<T extends HasMetadata> extends AbstractResource<T>
implements KubernetesResource, KubernetesResourceList<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package io.enmasse.common.model;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -17,6 +18,7 @@
type = Doneable.class,
prefix = "Doneable",
value = "done"))
@RegisterForReflection
public abstract class AbstractResource<T> {

private String kind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.quarkus.runtime.annotations.RegisterForReflection;

/**
* A default set of Jackson annotations for custom resources.
Expand All @@ -25,6 +26,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@Retention(RUNTIME)
@Target(TYPE)
@RegisterForReflection
public @interface DefaultCustomResource {

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -22,6 +23,7 @@
)
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AcceptedStatus {

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -22,6 +23,7 @@
)
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AdapterConfig extends ServiceConfig {

private Boolean enabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,6 +21,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AdapterConfiguration {

private Boolean enabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,6 +21,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AdapterOptions {

private long maxPayloadSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -21,6 +22,7 @@
)
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AdapterStatus extends CommonStatus {

private boolean enabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -23,6 +24,7 @@
)
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AdaptersConfig {
private AdapterOptions defaults;
private AdapterConfig http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,6 +21,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AddressConfig {

private String plan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -19,6 +20,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AddressSpaceConfig {
private String name;
private String plan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,6 +21,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AddressesConfig {

private AddressConfig command;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,5 +21,6 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class AuthenticationServiceConfig extends CommonServiceConfig {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,6 +21,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class CollectorConfig {
private ContainerConfig container;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -22,6 +23,7 @@
)
)
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class CommonAdapterContainers {

private JavaContainerConfig adapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.google.common.base.MoreObjects.ToStringHelper;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -22,6 +23,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class CommonCondition<T extends Enum<T>> {

private T type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -22,6 +23,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(NON_DEFAULT)
@RegisterForReflection
public class CommonDeviceRegistry {
private boolean disabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import io.fabric8.kubernetes.api.model.Doneable;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.BuildableReference;
import io.sundr.builder.annotations.Inline;
Expand All @@ -27,6 +28,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@RegisterForReflection
public class CommonLoggingConfig {

private String level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -22,6 +23,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(NON_NULL)
@RegisterForReflection
public class CommonServiceConfig extends ServiceConfig {

private JavaContainerConfig container;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;

import io.fabric8.kubernetes.api.model.Doneable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.sundr.builder.annotations.Buildable;
import io.sundr.builder.annotations.Inline;

Expand All @@ -20,6 +21,7 @@
prefix = "Doneable",
value = "done"))
@JsonInclude(JsonInclude.Include.NON_NULL)
@RegisterForReflection
public class CommonStatus {

private EndpointStatus endpoint;
Expand Down
Loading

0 comments on commit 1a7abab

Please sign in to comment.