Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:15
    rohanKanojia review_request_removed #1504
  • 08:14
    rohanKanojia review_requested #1504
  • 08:13
    rohanKanojia commented #1506
  • 08:01
    sunix edited #1506
  • 08:00
    sunix edited #1506
  • 07:57
    sunix opened #1506
  • 04:58
    manusa commented #1502
  • 04:57
    manusa commented #1502
  • 04:57
    manusa commented #1502
  • 04:52
    manusa commented #1502
  • 04:50
    manusa commented #1502
  • 04:49
    manusa commented #1502
  • 04:44
    manusa commented #1502
  • 04:44
    manusa commented #1502
  • 04:43
    manusa commented #1502
  • 04:42
    manusa commented #1502
  • 04:41
    manusa commented #1502
  • 04:41
    manusa commented #1502
  • 04:41
    manusa commented #1502
  • 04:40
    manusa commented #1502
Marc Nuri
@manusa
image.png
Noel O'Connor
@noeloc_twitter
Hi, I'm struggling to use jkube on an existing quarkus multimodule project. For some reason jKube cannot detect that it's a quarkus project and then can't generate the correct resources. How does jkube detect that it's a quarkus project ?
Rohan Kumar
@rohanKanojia
oh, could this be related to eclipse/jkube#923
Which version of quarkus are you using?
JKube has this concept of generators in which it creates opinionated container images by checking your plugins: https://github.com/eclipse/jkube/blob/master/jkube-kit/jkube-kit-quarkus/src/main/java/org/eclipse/jkube/quarkus/generator/QuarkusGenerator.java#L69
Noel O'Connor
@noeloc_twitter
thanks Rohan, I'll try that....I do have the plugin but only on the parent pom so that might be the issue
Rohan Kumar
@rohanKanojia
Do you have the project available publicly somewhere so that we can also try out and check?
Noel O'Connor
@noeloc_twitter
yep...hold on 1 min
https://github.com/noelo/istio-demo just a playground at the moment I'm using for a few things
Noel O'Connor
@noeloc_twitter
yep just confirmed it was linked to the jkube#923 that you mentioned
Rohan Kumar
@rohanKanojia
For now you can build jkube 1.5.0-SNAPSHOT locally and get going. This fix should be available in next release
Noel O'Connor
@noeloc_twitter
excellent, thanks for this
Rohan Kumar
@rohanKanojia
Thanks for trying out jkube :-) . Feel free to ask any questions. We would be really happy if jkube works out for your use case.
Noel O'Connor
@noeloc_twitter
another question: is there an example of a maven multi-module project that works with oc:resource
It seems that during oc:resource the generator tries to find the quarkus jar but there isn't on in the parent project
and there doesnt' seem to be a way in which I can say process the modules but ignore the parent
I'm not sure if this is even possible with jkube
Noel O'Connor
@noeloc_twitter
never mind I figure it out...I added the skipResource=true on the parent and false on the modules
Rohan Kumar
@rohanKanojia
:+1:
Marc Nuri
@manusa
Hi Noel, regarding multi-module there are different approaches.
One of them should be to have a final module that collects the resources generated by the rest of the modules in the project.
This module should depend on the rest of the modules. The generated package should contain a YAML artifact with the collection of the rest of resources (jkube-dependency enricher).
One of the fuse examples works this way, I'll try to find a link for you.
Marc Nuri
@manusa
So in your https://github.com/noelo/istio-demo you could have a final module uber-yml;P that would depend on the rest of modules that do generate YAMLs. This module should collect the resources generated by the rest. Here you could add for example the helm goal execution so that a single chart was produced.
Noel O'Connor
@noeloc_twitter
excellent, a single chart was exactly what I was hoping for, I'll try it out but if you find that fuse example I'd appreciate it, it's not in the quickstarts as far as I can see....
Marc Nuri
@manusa
I couldn't find it.
There's an internal issue that has a sample reproducer project
Noel O'Connor
@noeloc_twitter
no worries, you've set me on the right path so I'll try it out anyway...cheers
Marc Nuri
@manusa
:thumbsup:
robinroos
@robinroos
OpenJDK 17 has been released. Once the necessaru UBI is in place do I merely have to set maven.compiler.source and maven.compiler.target to get an OpenJDK 17 image?
Rohan Kumar
@rohanKanojia
I think we need to discuss how we're going to provide jdk17 based images. Maybe what you're suggesting would be our approach. We'll check project's jdk and switch base image based on that. I would appreciate if you could open an issue where we can discuss this.
Marc Nuri
@manusa
The plan is to provide a JDK17 compatible base image once the package is out.
(and we release 1.5)
Rohan Kumar
@rohanKanojia
Someone from Kogito team also pinged me today regarding release of 1.5.0
Marc Nuri
@manusa

If you provide your own, then

maven.compiler.source and maven.compiler.target to get an OpenJDK 17 image?

Yes, that's enough

Rohan Kumar
@rohanKanojia
They were migrating from fabric8-maven-plugin to jkube and bumped into eclipse/jkube#815
Marc Nuri
@manusa
1.5 should be released before the 21st of October
Rohan Kumar
@rohanKanojia
cool, Thanks.
Marc Nuri
@manusa
Our base image can be upgraded before, but won't be part of 1.5. You could use that base image with earlier versions of JKube by overriding: jkube.generator.from
robinroos
@robinroos

I'm having some difficulties getting a docker image pushed to our local Nexus. Despite my configuration, the push is to "docker://myimagename:latest".

I have the following property settings in force (declared as maven property elements, but shown below as name=value):

jkube.build.buildOutput.kind = DockerImage
jkube.docker.registry = my.nexus.com:8443/repository/MyProject-Docker
jkube.build.pushSecret = my-nexus
jkube.build.switchToDeployment = true
jkube.build.strategy = docker

It would appear that the jkube.docker.registry value is being ignored.

32 replies
Christian-dev-ops
@Christian-dev-ops
hello guys, how to can use Jkube the the mechanisms Kubernetes uses to control resources such as CPU and memory?
Example: resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
Rohan Kumar
@rohanKanojia
For now, I think we only support adding a deployment.yaml fragment with custom requests/limits in src/main/jkube
I can't see any field in resource configuration related to requests/limits
We do have requests/limits configuration field for S2I builds(applicable to OpenShift only) https://github.com/eclipse/jkube/blob/master/jkube-kit/config/resource/src/main/java/org/eclipse/jkube/kit/config/resource/OpenshiftBuildConfig.java . Maybe we can add similar resources configuration field in ResourceConfig class also?
Marc Nuri
@manusa
Starting release process for Eclipse JKube 1.5.0
Marc Nuri
@manusa
Starting release process for Eclipse JKube 1.5.1
Marino Borra
@mborra
Hi everyone, I have a need, which I thought to solve with profiles and fragments, I would like to generate different kubernetes.yaml for different environments (local-dev, dev, remote-dev, ...) I would like to use the fragments for the common parts and use the profiles with different directories, I also did different Maven execution, but even setting different profiles I get different kubernetes.yaml in different directories but which are in fact the same and are a mix of all the profiles. I may not have understood how multiple profiles associated with directories and with common fragments work.
12 replies
Zoran Regvart
@zregvart

I'm trying to migrate from Fabric8 Maven Plugin to OpenShift Maven Plugin, what we had working with FMP was a Docker based build with a Dockerfile and an inline assembly to add more files outside of the context. This is our configuration using FMP: https://github.com/syndesisio/syndesis/blob/c5362115c7adb09190059ed7dbb76a347e767d60/app/ui-react/pom.xml#L326-L360.
With JKube an attempt to use docker buildStrategy with a Dockerfile and an inline assembly leads to exception:

Failed to execute the build: Unable to build the image using the OpenShift build service: This image has already been flattened, you can only flatten the image once

It seems that AssemblyConfiguration::getFlattenedClone is called twice in this case: once from OpenshiftBuildService::build and subsequently from AssemblyManager::getAssemblyConfigurationForDockerfileMode.
At this point I'd like to explore if there is a way to achieve a docker based OpenShift build with Dockerfile and additional files outside of the context with OpenShift Maven Plugin.
I've found that including the empty <assembly> in this constelation triggers the issue, for example this will fail:

<plugin>
  <groupId>org.eclipse.jkube</groupId>
  <artifactId>openshift-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>default-cli</id>
      <phase>package</phase>
      <goals>
        <goal>build</goal>
      </goals>
      <configuration>
        <skipBuildPom>false</skipBuildPom>
        <buildStrategy>docker</buildStrategy>
        <images>
          <image>
            <name>test</name>
            <build>
              <dockerFile>${basedir}/docker/Dockerfile</dockerFile>
              <assembly />
            </build>
          </image>
        </images>
      </configuration>
    </execution>
  </executions>
</plugin>
Rohan Kumar
@rohanKanojia
Which version of jkube are you using?
Rohan Kumar
@rohanKanojia
Do you have your branch somewhere where you have with migrated to jkube configuration?