Can't seem to override the use of project.artifactId as the application reference in the deployment descriptor
See original GitHub issueDescription
This is likely just a configuration issue, but can’t figure it out. Hence this ticket.
As part of our build we would like to control the application reference use across the different files generated from the resource goal. Here’s an example:
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: greetings-api
provider: jkube
group: dk.something.someting.rest
The plugin doesn’t seem to let us control the spec:selector:app reference - at least I can’t figure out how. This defaults to the project.artifactId. This makes sense, but we would like to have it a difference value, in order for us to deploy our application in different version; within the same namespace (running on OpenShift). Any way we could add the version or some other property to this string?
What happens now is that we get different applications deployed, but they seem to share their individual services and routes between them. Which isn’t what we are looking for.
So how can we control the value ending up in the .yaml files under spec:selector:app?
Info
- Eclipse JKube version: 1.0.0-alpha-4
- Maven version (
mvn -v) :
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.7, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-17763-microsoft", arch: "amd64", family: "unix"
- Kubernetes / Red Hat OpenShift setup and version:
OpenShift Master:
v3.11.216
Kubernetes Master:
v1.11.0+d4cacc0
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (24 by maintainers)

Top Related StackOverflow Question
It appears that ProjectLabelEnricher doesn’t have any test right now. You can have a look at tests for this package:
https://github.com/eclipse/jkube/tree/master/jkube-kit/enricher/generic/src/test/java/org/eclipse/jkube/enricher/generic
I think it’s here:
https://github.com/eclipse/jkube/tree/master/kubernetes-maven-plugin/doc/src/main/asciidoc/inc