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

Add sidecar initializer option to customize injected sidecar per deployment #1061

Closed
ayj opened this issue Aug 18, 2017 · 10 comments
Closed
Assignees
Milestone

Comments

@ayj
Copy link
Contributor

ayj commented Aug 18, 2017

cc @costinm

It would be great to customize the sidecar tag (or full path) using annotations. For example to pick a debug image of sidecar for a job that needs debugging (ideally the full path of the sidecar should be specified ). Or a job may use a specialized sidecar. Or many other use cases

For example, customizing the injected sidecar image per deployment would look something like the following. The initializer would look for this annotation during injection and override the default sidecar image. The initializer may need additional policy to allow/disallow such customization to avoid undesirable proxy bypass.

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    options.sidecar.istio.io/proxy_image: "docker.io/ayj/my_debug_proxy_image:e6ebaa8
  name: my-deployment 
# etc ... 
@ayj ayj added this to the Istio 0.3 milestone Aug 18, 2017
@costinm
Copy link
Contributor

costinm commented Aug 18, 2017

Thanks, that would be perfect. Same for the initializer, and maybe the initializer options.
As mentioned in a separate PR, I am evaluating using the sidecar image for initialization as well,
i.e. have both the iptables script and envoy.

Is this style of annotation names the standard ( a.b.c/d ) ? Maybe a bit shorter ?
sidecar.istio.io/proxy_image, or istio.io/sidecar_image ?

@ayj
Copy link
Contributor Author

ayj commented Aug 18, 2017

#1062 should address the initializer configuration.

Which PR did you reference initialization? Were you thinking of using the same sidecar template for non-k8s VM deployments?

This style seems somewhat consistent with k8s ingress annotations which are defined
here. sidecar.istio.io/proxy_image would work though I think the extra options category further clarified how that annotation was used, e.g. policy vs. status vs. options.

@saumoh
Copy link

saumoh commented Aug 24, 2017

@costinm, which pr are you using for using the initializer for influencing the deployment/pod iptables configuration.
cc @vadimeisenbergibm @elevran

@ayj ayj assigned ayj and unassigned ayj Aug 25, 2017
@ayj
Copy link
Contributor Author

ayj commented Aug 29, 2017

@saumoh was going to take a look at this issue, but I wasn't able to assign it to them. Is assignment restricted to org members?

@kyessenov
Copy link
Contributor

@geeknoid must be some administrative setting: we seem to unable to assign to non-org members

@geeknoid
Copy link

I think you can only assign issues to team members, or people that have been explicitly added as collaborators.

@ayj ayj assigned ayj and unassigned ayj Sep 1, 2017
@gyliu513
Copy link
Member

gyliu513 commented Sep 7, 2017

I think that we are already able to customize the images for both init and proxy at here https://github.com/istio/pilot/blob/master/test/integration/testdata/initializer-configmap.yaml.tmpl#L13-L14 , can this one be closed?

@ayj
Copy link
Contributor Author

ayj commented Sep 7, 2017

This issue is to allow per-deployment overrides whereas the Initializer ConfigMap applies globally.

@gyliu513 gyliu513 changed the title Add sidecar initializer option to customize injected sidecar Add sidecar initializer option to customize injected sidecar per deployment Sep 8, 2017
@gyliu513
Copy link
Member

gyliu513 commented Sep 8, 2017

@ayj Ah, I see, thanks, update the summary a bit to reflect the real case here.

@kyessenov
Copy link
Contributor

Issue moved to istio/istio #1418 via ZenHub

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants