Is your enhancement related to a problem? Please describe
As a Java developer, I'm writing a Jakarta EE application that is deployed on Kubernetes.
It is running on WildFly and needs a database.
In my Java project, I'm using the kubernetes-maven-plugin to build and push a container image.
Now, I want to use Helm to package and deploy my application.
My Java project does not need to create any Kubernetes resources. Instead it relies on the wildfly and postgresql Helm charts to deploy the resources.
The ideal workflow I want to achieve is:
# Push my application image in a container registry and generate a Helm Chart that depends on the wildfly and postgresql to handle the deployment on Kubernetes
$ mvn k8s:build k8s:push k8s:helm
# Deploy the full application (my app, WildFly and PostgreSQL) on Kubernetes
$ helm install -g -f ./my-app-1.0.0.tgz
I can already configure the expected Helm Chart from the pom.xml with:
This workaround is not blocking me but I think it is a valid use case to be able to generate a Helm Chart without any Kubernetes resource in the Java project.
From JKube point of view, I think k8s:helm should remove the requirement that Kubernetes resources exists inside the Java project (or its target dir).
Component
Kubernetes Maven Plugin
Is your enhancement related to a problem? Please describe
As a Java developer, I'm writing a Jakarta EE application that is deployed on Kubernetes. It is running on WildFly and needs a database. In my Java project, I'm using the kubernetes-maven-plugin to build and push a container image.
Now, I want to use Helm to package and deploy my application. My Java project does not need to create any Kubernetes resources. Instead it relies on the wildfly and postgresql Helm charts to deploy the resources.
The ideal workflow I want to achieve is:
I can already configure the expected Helm Chart from the
pom.xml
with:However, JKube complains when I run
mvn k8s:helm
Running
mvn clean k8s:resource k8s:helm
does not fix the failure:Describe the solution you'd like
I want to use JKube to generate a Helm Chart without requiring Kubernetes resources from the Java project.
Describe alternatives you've considered
The workaround I found was to create an
empty.yaml
file insrc/main/kubernetes
with an empty content.With that change,
mvn clean k8s:resource k8s:helm
works:And the generated Helm chart contains the expected configuration:
Additional context
This workaround is not blocking me but I think it is a valid use case to be able to generate a Helm Chart without any Kubernetes resource in the Java project.
From JKube point of view, I think
k8s:helm
should remove the requirement that Kubernetes resources exists inside the Java project (or its target dir).