Kind
@Kind is a more specialized form of @KubernetesApplication. It can be added to your project like:
import io.dekorate.kind.annotation.Kind;
@Kind
public class Main {
public static void main(String[] args) {
//Your application code goes here.
}
}
When the project gets compiled, the annotation will trigger the generation of a Deployment
in both kind.json
and kind.yml
that
will end up under ‘target/classes/META-INF/dekorate’. Also, if the deployment is enabled, it will automate the process of loading images to the cluster
when performing container image builds.
Adding the kind annotation processor to the classpath
This module can be added to the project using:
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>kind-annotations</artifactId>
<version>4.1.4</version>
</dependency>
The @Kind
annotation can be used in combination with @KubernetesApplication
. In that case the @Kind
configuration will take precedence over the one specified using @KubernetesApplication
in the generated Kind manifests.
REMINDER: A complete reference on all the supported properties can be found in the configuration options guide.
Check the Kind example here.