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

Istio compatibility issue #260

Closed
Hugheym opened this issue Sep 29, 2018 · 4 comments
Closed

Istio compatibility issue #260

Hugheym opened this issue Sep 29, 2018 · 4 comments
Assignees

Comments

@Hugheym
Copy link
Contributor

Hugheym commented Sep 29, 2018

I'm trying to deploy on GKE with istio. The problem occurs specifically because of side-car injection, which isn't unique to istio and is part of Envoy. Because an extra container is injected for traffic proxying, the imageID that the operator gets from the imageID pod ends up being that of the side-car. So the image of the container named 'server' in the final deployment becomes istio/proxyv2@sha..., so the container fails to execute arango commands.
I think I've identified the problem as line 122 in pkg/deployment/images.go:

imageID := k8sutil.ConvertImageID2Image(pod.Status.ContainerStatuses[0].ImageID)

I believe changing this to something like:

rawImageID := pod.Status.ContainerStatuses[0].ImageID
if len(pod.Status.ContainerStatuses)>1 {
	for _, containerStatus := range pod.Status.ContainerStatuses {
		if strings.Contains(containerStatus.ImageID, "arango"){
				rawImageID = containerStatus.ImageID
	         }
	}
}
imageID := k8sutil.ConvertImageID2Image(rawImageID)

should fix this issue.

@Hugheym
Copy link
Contributor Author

Hugheym commented Oct 1, 2018

I've confirmed that this fixes the issue for me.

@pamelin
Copy link

pamelin commented Nov 8, 2018

Hey @Hugheym are you going to raise PR for this? We are having the same issue.

@maierlars maierlars self-assigned this Nov 8, 2018
@maierlars
Copy link
Collaborator

Hi @Hugheym

Thanks a lot for your improvements. We are using an Apache 2 CLA for ArangoDB and its sub-components, which can be found here: https://www.arangodb.com/documents/cla.pdf

Could you please sign, scan and email it to cla@arangodb.com

Thanks a lot

I prepared a branch for you already:
https://github.com/arangodb/kube-arangodb/tree/bug-fix/side-car-injection
Please feel free to create a new branch and copy the changes to become the author.

@Hugheym
Copy link
Contributor Author

Hugheym commented Nov 13, 2018

@lamai93 Thanks! I sent the CLA and created a PR.

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

No branches or pull requests

3 participants