gloo icon indicating copy to clipboard operation
gloo copied to clipboard

Glooctl in a Docker image

Open cdancy opened this issue 4 years ago • 12 comments

Just wondering if you guys would be up for putting the glooctl binary into a docker image for ease of use. This is done for other projects like istioctl and helmctl and things of that nature.

cdancy avatar Aug 03 '20 17:08 cdancy

That's a good idea, it's not on our immediate roadmap but I would love to help you get a community PR across the finish line, if you'd like to contribute.

kdorosh avatar Aug 07 '20 15:08 kdorosh

@kdorosh yeah I'd be up for that. I mean ... it's really just as simple as dumping the glooctl say into an alpine image and we'd be good to go :)

cdancy avatar Aug 07 '20 16:08 cdancy

Of course, I was just volunteering PR review 😄

kdorosh avatar Aug 07 '20 17:08 kdorosh

@kdorosh OK I'll throw something together and post back here when I've got it.

cdancy avatar Aug 07 '20 17:08 cdancy

@kdorosh in poking around other projects this might be a big task to take on and more complicated than just "copy binary into image and push".

cdancy avatar Aug 07 '20 18:08 cdancy

What makes you think that it's more complicated? we should just need to create a dockerfile for it, a make target, and then make sure we update the docker and docker-push make targets as necessary here: https://github.com/solo-io/gloo/blob/master/Makefile#L560-L578

kdorosh avatar Aug 08 '20 20:08 kdorosh

@kdorosh following back up on this as I've been absent and away with other things ... if someone from the community wants to pick this up that would be great. Currently I don't have the time to focus on this :(

cdancy avatar Oct 16 '20 15:10 cdancy

For everybody that needs this I have created my own fully automated dockerhub releases. A job checks every 6 hours the Github releases at solo-io/gloo and packages the latest glooctl with Alpine

Images are here https://hub.docker.com/r/kostiscodefresh/glooctl/tags

The Dockerfile is here https://github.com/kostis-codefresh/dockerize-latest-version/blob/main/app/Dockerfile

kostis-codefresh avatar Apr 01 '21 16:04 kostis-codefresh

First of all, good job!!

It would be nice if:

  • the image could have kubectl
  • it could be invoked like this:
    • docker run -v $HOME/.kube/config:/root/.kube/config kostiscodefresh/glooctl:v1.7.3 glooctl check
$ docker run -v $HOME/.kube/config:/root/.kube/config kostiscodefresh/glooctl:v1.7.3 /app/dockerized-app check

Checking deployments... OK
Checking pods... OK
Checking upstreams... OK
Checking upstream groups... OK
Checking auth configs... OK
Checking rate limit configs... OK
Checking secrets... OK
Checking virtual services... OK
Checking gateways... OK
Checking proxies... Problem while checking for out of sync proxies
1 Errors!
Error: 2 errors occurred:
	* exec: "kubectl": executable file not found in $PATH
	* exec: "kubectl": executable file not found in $PATH

jmunozro avatar Jul 08 '21 12:07 jmunozro

@jmunozro While I understand what you are asking, the implications are troubling.

This means that now I have to monitor kubectl releases as well. And what version of kubectl should I include in the image? Are all versions of glooctl compatible with all versions of kubectl? What about people that have an old cluster and don't want to upgrade yet?

Frankly I think it is much easier if glooctl didn't use the kubectl executable directly but instead used the actual Kubernetes api....

kostis-codefresh avatar Jul 08 '21 12:07 kostis-codefresh

I agree, created https://github.com/solo-io/gloo/issues/4990 to track that as separate issue

jmunozro avatar Jul 08 '21 13:07 jmunozro

This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.

github-actions[bot] avatar Dec 15 '23 19:12 github-actions[bot]