Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

4.0.0 is generating ImageChange triggers in the DeploymentConfig #1578

Closed
mojsha opened this issue Mar 18, 2019 · 4 comments
Closed

4.0.0 is generating ImageChange triggers in the DeploymentConfig #1578

mojsha opened this issue Mar 18, 2019 · 4 comments
Labels
cat/bug Bug which needs fixing

Comments

@mojsha
Copy link

mojsha commented Mar 18, 2019

Description

It seems like 4.0.0 has reverted to generating ImageChange triggers for OpenShift DeploymentConfig objects with the automatic field set to true, e.g.

    - imageChangeParams:
        automatic: true
        containerNames:
          - sample-t-demo
        from:
          kind: ImageStreamTag
          name: 'demo:1.0.40-Stable-Release'
          namespace: sample-t
        lastTriggeredImage: >-
          docker-registry.default.svc:5000/sample-t/demo@sha256:5a41e6403eafb57c8ffb9e6f46470d3d697171f400a44b1f2d323a14144e26bf

This needs to be fixed, and the flag to disable this re-introduced.

  • f-m-p version :
    4.0.0

  • Kubernetes / OpenShift setup and version :
    3.10

  • If it's a bug, how to reproduce :
    mvn fabric8:resource fabric8:build fabric8:apply on a project with a DeploymentConfig

@rohanKanojia

@rohanKanojia rohanKanojia added the cat/bug Bug which needs fixing label Mar 19, 2019
@rohanKanojia
Copy link
Member

@mojsha : just looked , I think flag is still there :

@Parameter(property = "fabric8.openshift.enableAutomaticTrigger", defaultValue = "true")
private Boolean enableAutomaticTrigger;

Are you facing this issue when using resource fragments? I think we missed flag here while refactoring:

specBuilder.addNewTrigger()
.withType("ImageChange")
.withNewImageChangeParams()
.withAutomatic(true)
.withNewFrom()
.withKind("ImageStreamTag")
.withName(image.getSimpleName() + ":" + tag)
.withNamespace(image.getUser())
.endFrom()
.withContainerNames(containerName)
.endImageChangeParams()

@mojsha
Copy link
Author

mojsha commented Mar 19, 2019

@rohanKanojia I am not sure since I haven't followed the code changes, but yes I am using a DC resource fragments and in the existing version (3.5.42) I don't get this ImageChangeTrigger added.

@rohanKanojia
Copy link
Member

rohanKanojia commented Mar 19, 2019

Are you talking about withAutomatic(true) thing or the image trigger getting added?

@mojsha
Copy link
Author

mojsha commented Mar 19, 2019

@rohanKanojia Yes precisely.The consequence is the extract I added in the first post, i.e. "automatic: true".

rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
…loymentConfig

Fixed my mistake while refactoring Converters into Enrichers
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
…loymentConfig

Fixed my mistake while refactoring Converters into Enrichers
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
…loymentConfig

Fixed my mistake while refactoring Converters into Enrichers
rohanKanojia added a commit that referenced this issue Mar 19, 2019
…nfig

Fixed my mistake while refactoring Converters into Enrichers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/bug Bug which needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants