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

Support for Multi containers with Resource Fragments #968

Closed
kameshsampath opened this issue Jun 26, 2017 · 10 comments · Fixed by #1202
Closed

Support for Multi containers with Resource Fragments #968

kameshsampath opened this issue Jun 26, 2017 · 10 comments · Fixed by #1202
Assignees
Labels
cat/feature Feature request group/kubernetes Kubernetes related issue group/openshift OpenShift related issue target/3.5 PR targeted to 3.5

Comments

@kameshsampath
Copy link
Contributor

kameshsampath commented Jun 26, 2017

Description

When using Resource Fragments, the plugin is not able to merge i.e to append to containers - when containers in Deployment Template Spec already has a container defined. This will be typically useful when we handle sidecars

Currently the resource merge thinks the existing container definition as the application definition and merges to it instead of appending it.

Info

  • f-m-p version : 3.4.1
  • Maven version (mvn -v) :
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_92, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.5", arch: "x86_64", family: "mac"
  • Kubernetes / OpenShift setup and version :
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T20:41:24Z", GoVersion:"go1.8.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-06-21T20:14:56Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
  • If it's a bug, how to reproduce :
    1. Create a simple spring boot or any other supported project
    2. Create a deployment.yml with one container added to Deployment Template Spec, dont add the application container spec
  1. run mvn fabric8:resource, you will see the plugin merging the application container spec with existing spec defined
@rhuss
Copy link
Contributor

rhuss commented Jun 26, 2017

Agreed that this should be possible. I wonder though, how we could distinguish the case whether we should add a new container to the container list and when we should merge containers. Maybe we should correlate over the image name itself ?

I'm happy about any PR for this feature.

@kameshsampath
Copy link
Contributor Author

yeah using image is the best way - as that will be unique amongst the containers

@kameshsampath
Copy link
Contributor Author

kameshsampath commented Jun 27, 2017

@rhuss - how shall we call the variable for adding probes to multiple containers

right now am calling as probeMode with values:

  • all - applies Liveliness and Readiness to all containers in deployment
  • first - applies Liveliness and Readiness to first container of the deployment
  • last - applies Liveliness and Readiness to last container of the deployment

@kameshsampath
Copy link
Contributor Author

@nicolaferraro - your thoughts ?

@kameshsampath
Copy link
Contributor Author

@jstrachan , @nicolaferraro , @rhuss - this #969 resolves the issue

@christophetd
Copy link

christophetd commented Nov 6, 2017

Any update on this? I believe it would be a very important feature to have, especially since service meshes such as Linkerd or Envoy running as a sidecar container are starting to get a lot of traction.

It seems that #969 has been abandoned, are there any plans to support this feature? I'm willing to help on the PR if's useful.

Thanks!

@kameshsampath
Copy link
Contributor Author

@jstrachan @hrishin - shall we start dust this out ?

CC: @pradeepto

@jstrachan
Copy link
Contributor

sounds good - if we use the container name in the fragments to do the merge things should be straightforward I hope

nicolaferraro added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Jun 22, 2018
nicolaferraro added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Jun 22, 2018
nicolaferraro added a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Jun 22, 2018
@rohanKanojia rohanKanojia added cat/feature Feature request group/openshift OpenShift related issue group/kubernetes Kubernetes related issue labels Jul 23, 2018
@jpkrohling
Copy link

Just wanted to add my support to this issue :-) Without proper support to sidecars, it's also hard to get a Jaeger Agent deployed automatically with an application making use of distributed tracing with Jaeger.

@rhuss rhuss added the target/3.5 PR targeted to 3.5 label Oct 1, 2018
rohanKanojia pushed a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Oct 30, 2018
rohanKanojia pushed a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Oct 30, 2018
rohanKanojia pushed a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Nov 2, 2018
@stale
Copy link

stale bot commented Dec 30, 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 Dec 30, 2018
@rohanKanojia rohanKanojia removed the status/stale Issue/PR considered to be stale label Dec 31, 2018
rohanKanojia pushed a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Jan 14, 2019
rohanKanojia pushed a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Jan 16, 2019
rohanKanojia pushed a commit to rohanKanojia/fabric8-maven-plugin that referenced this issue Mar 1, 2019
rohanKanojia pushed a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Mar 11, 2019
rohanKanojia pushed a commit to nicolaferraro/fabric8-maven-plugin that referenced this issue Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/feature Feature request group/kubernetes Kubernetes related issue group/openshift OpenShift related issue target/3.5 PR targeted to 3.5
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants