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

Do not add ImageChange change triggers for Docker images #1037

Closed
nicolaferraro opened this issue Sep 5, 2017 · 4 comments
Closed

Do not add ImageChange change triggers for Docker images #1037

nicolaferraro opened this issue Sep 5, 2017 · 4 comments
Assignees
Labels
cat/bug Bug which needs fixing group/enricher Enricher related prio/p1 Normal priority

Comments

@nicolaferraro
Copy link
Member

When using a docker image without image stream for a container in Openshift (e.g. to deploy a sidecar) in the src/main/fabric8/deployment.yml file (example here), the plugin adds a triggers on ImageStreamTag change, but there's no image stream since we want to use the docker image directly.

Fragment of the generated yml.

...
    triggers:
      type: ImageChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - jaeger-agent
        from:
          kind: ImageStreamTag
          name: jaeger-agent:latest

In this case the docker image is jaegertracing/jaeger-agent:latest. We should detect if a container image is a IS or a Docker image and add triggers in the first case only.

@stale
Copy link

stale bot commented Oct 4, 2018

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@stale stale bot added the status/stale Issue/PR considered to be stale label Oct 4, 2018
@rhuss rhuss added the cat/bug Bug which needs fixing label Oct 6, 2018
@stale stale bot removed the status/stale Issue/PR considered to be stale label Oct 6, 2018
@rhuss rhuss added prio/p1 Normal priority group/enricher Enricher related labels Oct 6, 2018
@lordofthejars
Copy link
Contributor

When we merge this #1202 I think this issue might easiest to implement since after that sidecars containers are clearly separated from autogenerated ones.

@rohanKanojia rohanKanojia self-assigned this Jan 16, 2019
rohanKanojia added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Jan 17, 2019
Don't add ImageChange triggers to containers other than main
application containers. In Openshift mode, ImageStream is used
by default. This is just a workaround for fabric8io#1037
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 1, 2019
Don't add ImageChange triggers to containers other than main
application containers. In Openshift mode, ImageStream is used
by default. This is just a workaround for fabric8io#1037
@aliepold
Copy link

aliepold commented Mar 10, 2019

Hello
this issue looks the same as #816.
In my comment I have implemented a small workaround:

#816 (comment)

@rohanKanojia
Copy link
Member

Since Deployment to DeploymentConfig logic has been shifted to enrichers we can check the effective RuntimeMode and add triggers only when runtime mode is openshift(i.e s2i build is used in which we always create imagestream)

rohanKanojia added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Mar 11, 2019
Don't add ImageChange triggers to containers other than main
application containers. In Openshift mode, ImageStream is used
by default. This is just a workaround for fabric8io#1037
rohanKanojia added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Mar 11, 2019
rohanKanojia added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Mar 13, 2019
Don't add ImageChange triggers to containers other than main
application containers. In Openshift mode, ImageStream is used
by default. This is just a workaround for fabric8io#1037
rohanKanojia added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Mar 13, 2019
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
… images

Only add triggers to main application container
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
… images

Only add triggers to main application container
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
… images

+ Only add triggers to main application container
+ Added ImageChangeTriggerEnricher for handling triggers in separate enricher
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 19, 2019
… images

+ Only add triggers to main application container
+ Added ImageChangeTriggerEnricher for handling triggers in separate enricher
rohanKanojia added a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 21, 2019
… images

+ Only add triggers to main application container
+ Added ImageChangeTriggerEnricher for handling triggers in separate enricher
rohanKanojia added a commit that referenced this issue Mar 21, 2019
+ Only add triggers to main application container
+ Added ImageChangeTriggerEnricher for handling triggers in separate enricher
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/bug Bug which needs fixing group/enricher Enricher related prio/p1 Normal priority
Projects
None yet
Development

No branches or pull requests

5 participants