gloo
gloo copied to clipboard
Glooctl in a Docker image
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.
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 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 :)
Of course, I was just volunteering PR review 😄
@kdorosh OK I'll throw something together and post back here when I've got it.
@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".
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 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 :(
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
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 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....
I agree, created https://github.com/solo-io/gloo/issues/4990 to track that as separate issue
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.