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

oc:apply with an image built with jib is not working #1532

Closed
sunix opened this issue May 31, 2022 · 0 comments · Fixed by #1646
Closed

oc:apply with an image built with jib is not working #1532

sunix opened this issue May 31, 2022 · 0 comments · Fixed by #1646
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sunix
Copy link
Member

sunix commented May 31, 2022

Description

The openshift deploymentConfig is hanging not starting the pod if oc:build has been used with the jib strategy.

Workaround: remove from the deploymentConfig

    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - quarkus
        from:
          kind: ImageStreamTag
          name: jkube-jib-quarkus:latest
      type: ImageChange

Info

  • Eclipse JKube version : 1.8.0
  • Kubernetes / Red Hat OpenShift setup and version : Devsandbox

how to reproduce :

  1. create your own quay.io repo empty. mine is quay.io/sunix/jkube-jib-quarkus, configure access for jkube to quay.io (see documentation), oc login to an openshift cluster (devsandbox for me)
  2. configure quickstarts/maven/quarkus/pom.xml with the properties (generator name to be adapted)
        <jkube.build.strategy>jib</jkube.build.strategy>
        <jkube.generator.name>quay.io/sunix/jkube-jib-quarkus</jkube.generator.name>
    
  3. run mvn clean package oc:build oc:push oc:resource oc:apply
  4. everything looks ok but ...
    Selection_663
    in the DeploymentConfig status:
    status:
      latestVersion: 0
      observedGeneration: 1
      replicas: 0
      updatedReplicas: 0
      availableReplicas: 0
      unavailableReplicas: 0
      conditions:
        - type: Available
          status: 'False'
          lastUpdateTime: '2022-05-31T15:30:52Z'
          lastTransitionTime: '2022-05-31T15:30:52Z'
          message: Deployment config does not have minimum availability.
    
@sunix sunix added the bug Something isn't working label May 31, 2022
@rohanKanojia rohanKanojia self-assigned this Jul 5, 2022
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 6, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 7, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 7, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 7, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 7, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 7, 2022
…er registry in ImageConfiguration (eclipse-jkube#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 8, 2022
…er registry in ImageConfiguration (eclipse-jkube#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 8, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 8, 2022
…er registry in ImageConfiguration (eclipse-jkube#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 8, 2022
…er registry in ImageConfiguration (eclipse-jkube#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 12, 2022
…er registry in ImageConfiguration (eclipse-jkube#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 12, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit that referenced this issue Jul 14, 2022
…er registry in ImageConfiguration (#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 18, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 20, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@manusa manusa added this to the 1.9.0 milestone Jul 25, 2022
manusa pushed a commit that referenced this issue Jul 25, 2022
…ate ImageChange triggers for JIB build strategy (#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
baruKreddy pushed a commit to baruKreddy/jkube that referenced this issue Aug 11, 2022
…er registry in ImageConfiguration (eclipse-jkube#1532)

OpenShiftBuildService doesn't consider registry in ImageConfiguration
while building image. This causes problems when BuildOutput kind is set
DockerImage and no registry name can be inferred from ImageName,
eventually causing authentication failure.

Add logic to append registry in ImageName before building image.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
baruKreddy pushed a commit to baruKreddy/jkube that referenced this issue Aug 11, 2022
…ate ImageChange triggers for JIB build strategy (eclipse-jkube#1532)

No ImageChange trigger should added to DeploymentConfig if BuildStrategy
is JIB.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants