Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Halkyon runtime and version #389

Open
jponge opened this issue Oct 28, 2019 · 5 comments
Open

Specify Halkyon runtime and version #389

jponge opened this issue Oct 28, 2019 · 5 comments

Comments

@jponge
Copy link

jponge commented Oct 28, 2019

I have been able to deploy a Vert.x component with the following hand-crafted resource:

apiVersion: halkyon.io/v1beta1
kind: Component
metadata:
  name: dekorate-and-vertx
spec:
  runtime: vert.x
  version: 3.8.3
  deploymentMode: dev
  port: 8080
  exposeService: true

Now I would like to have fun with hal and Dekorate, so I have this (annotation-less) file:

dekorate:

  kubernetes:
    serviceType: "LoadBalancer"
    ports:
      - name: "http"
        containerPort: 8080

  component:
    name: "dekorate-and-vertx"
    exposeService: true

which generates the following target/classes/META-INF/dekorate/halkyon.yml:

---
apiVersion: "v1"
kind: "List"
items:
- apiVersion: "halkyon.io/v1beta1"
  kind: "Component"
  metadata:
    labels:
      app: "dekorate-and-vertx"
      version: "0.0.0-SNAPSHOT"
      group: "jponge"
    name: "dekorate-and-vertx"
  spec:
    deploymentMode: "dev"
    version: "0.0.0-SNAPSHOT"
    exposeService: true
    port: 8080

It is missing runtime info, causing Halkyon to fail, and I cannot specify this with Dekorate.

@jponge jponge changed the title Speciffy Halkyon runtime and version Specify Halkyon runtime and version Oct 28, 2019
@jponge
Copy link
Author

jponge commented Oct 28, 2019

Note that in the resource produced by Dekorate, the spec.version is that of the component. In the manually crafted one that data matches the runtime info.

@iocanel
Copy link
Member

iocanel commented Oct 30, 2019

@jponge: This is something that we do support for Spring, but its a little bit hard to be able to tell when the runtime is vert.x.

We could possibly scan the classpath for known vert.x classes and from there we could pick up the version too.

@jponge
Copy link
Author

jponge commented Oct 31, 2019

The issue here is that the project version clashes with the runtime version.

You could indeed scan the classpath for the presence of io.vertx.core.Vertx, but I suspect this could give false positives for Quarkus and Snowdrop since Vert.x appears as a dependency.

@iocanel
Copy link
Member

iocanel commented Nov 4, 2019

Even though Quarkus does use dekorate, this is done usually via the quarkus kubernetes extension, so its pretty clear when we are talking about quarkus or not.

@rdruss
Copy link

rdruss commented Nov 22, 2019

For JKube (the new fabric8 maven plugin replacement) here is the generator used to determine if a project is a Vert.x project:

https://github.com/jkubeio/jkube/blob/master/jkube-kit/jkube-kit-vertx/src/main/java/io/jkube/vertx/generator/VertxGenerator.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants