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.

OpenShift Maven Plugin doesn't add ImageChange triggers when merging from a deployment fragment

See original GitHub issue

Description

Eclipse JKube is not adding ImageChange triggers to DeploymentConfig due to which applications deployed in openshift are failing with ImagePullErr. This seems to happen in a case when project has some deployment fragment in src/main/jkube directory. I have to explicitly add jkube.openshift.enrichAllWithImageChangeTrigger property in order to add ImageChange triggers:

    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - spring-boot
        from:
          kind: ImageStreamTag
          name: spring-boot-camel:latest
      type: ImageChange

Same project works fine without any extra configuration with Fabric8 Maven Plugin

Info

  • Eclipse JKube version : 1.0.0-rc-1
  • Maven version (mvn -v) :
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven
Java version: 1.8.0_251, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_251-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.6.19-300.fc32.x86_64", arch: "amd64", family: "unix"
  • Kubernetes / Red Hat OpenShift setup and version : OpenShift 4.5.1

  • If it’s a bug, how to reproduce :

  • Clone https://github.com/rohanKanojia/spring-boot-camel
  • Disable jkube.openshift.enrichAllWithImageChangeTrigger property
  • deploy application using mvn clean install -DskipTests oc:deploy -Popenshift
  • application would fail to deploy with ImagePullErr

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
manusacommented, Sep 7, 2020

No new version has been released.

Release 1.0.0 is scheduled for 2020-09-09.

In the meantime, you can either build master yourself or use jitpack:

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>
	<dependency>
	    <groupId>com.github.eclipse.jkube</groupId>
	    <artifactId>kubernetes-maven-plugin</artifactId>
	    <version>master</version>
	</dependency>
1reaction
manusacommented, Aug 6, 2020

That class needs a deep refactor. Please proceed as you may, but at least create 3 tests (1 of them must be failing) before implementing your fix. We really need to revisit that class. Cyclomatic complexity is terrible (77) right now, probably will raise to 83 after the fix…

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenShift Maven Plugin - JKube - Eclipse
This is a plain Spring Boot application, whose images are auto generated like in the Zero-Config case. The resource fragments are in src/main/jkube...
Read more >
Triggering updates on image stream changes
OpenShift Container Platform deployment configurations and build configurations can be automatically triggered by changes to image stream tags.
Read more >
CI/CD OpenShift Container Platform 4.9
OpenShift Container Platform is an enterprise-ready Kubernetes platform for developers, which enables organizations to automate the application delivery ...
Read more >
fabric8io/fabric8-maven-plugin
Add ImageChange triggers to DeploymentConfigs when on openshift. true. 5.2. fabric8:build. This goal is for building Docker images. Images can ...
Read more >
Documentation Style Guide - GitLab Docs
For style questions, mention @tw-style in an issue or merge request. If you have access to the GitLab Slack workspace, use the #docs-processes...
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