question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't seem to override the use of project.artifactId as the application reference in the deployment descriptor

See original GitHub issue

Description

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:closed
  • Created 3 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
rohanKanojiacommented, Jul 28, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven with an explicit finalName won't work properly
The strict answer to your question is that ${project.parent.name} will not be resolved as part the model interpolation process.
Read more >
Use a unique property to set Maven version
Define the version with a property. First try, extract the version is a Maven property. Our parent pom becomes: <project> <groupId> ...
Read more >
Deployable Artifacts in Maven project not updating when ...
I have a Maven project that, when imported into IntelliJ IDEA, the deployable WAR artifacts (web.xml) were detected.
Read more >
Building applications with Maven
This goal will resolve all the runtime, build time, test and dev mode dependencies of the application downloading them to the configured local...
Read more >
POM Reference - Maven
If the my-parent project uses dependencyManagement to define a dependency on junit:junit:4.12 , then POMs inheriting from this one can set their dependency ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found