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

[k8s plugin] Kubernetes:Run command should work w/o Docker #13316

Closed
azatsarynnyy opened this issue May 11, 2019 · 10 comments · Fixed by eclipse-che/che-theia#220
Closed

[k8s plugin] Kubernetes:Run command should work w/o Docker #13316

azatsarynnyy opened this issue May 11, 2019 · 10 comments · Fixed by eclipse-che/che-theia#220
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

The Kubernetes Tooling Che Plugin provides Kubernetes: Run command that does the following steps:

  • builds a project image with docker build
  • pushes the built image to an image registry with docker push
  • creates a K8s deployment to run a pod with a container from the built image with kubectl run

Previously, the user should log into an image registry with docker login.

Since we can't use Docker daemon in a plugin sidecar, the goal of this task is to replace using Docker by the K8s Plugin with some rootless image build tool, e.g. Buildah.

@azatsarynnyy azatsarynnyy added kind/task Internal things, technical debt, and to-do tasks to be performed. team/ide labels May 11, 2019
@azatsarynnyy azatsarynnyy self-assigned this May 11, 2019
@azatsarynnyy
Copy link
Member Author

I've experimented with Buildah here by wrapping its calls into docker.sh script placed under /usr/local/bin to make it accessible from $PATH.
So the K8s Plugin still calls docker but the script calls the corresponded buildah commands.

@azatsarynnyy
Copy link
Member Author

buildah login command has been added in the latest version - 1.8.2. But it's not available yet in CentOS (parent image for the K8s Plugin) app repos.
Likely, it will be published after the summit containers/buildah#1557 (comment)
I'll try with the containerized Buildah from https://quay.io/buildah/upstream

@gorkem
Copy link
Contributor

gorkem commented May 11, 2019

@azatsarynnyy Can we change the extension itself to use buildah commands instead of the wrapper? I can discuss it with the extension owner if you think you can provide a PR for it. Perhaps, a preference or auto-detect mechanism to use buildah can be added?

@azatsarynnyy
Copy link
Member Author

@gorkem it shouldn't take much time to add support for buildah as an alternative image builder in the VS Code K8s extension. So, if guys are interested in such a contribution, I can provide PR.

@gorkem
Copy link
Contributor

gorkem commented May 16, 2019

@azatsarynnyy Can you provide a PR to upstream and ping me. Perhaps something that detects if buildah exists or docker not working and opts to the other.

@azatsarynnyy
Copy link
Member Author

@gorkem ok, I'll tackle it next week

@azatsarynnyy
Copy link
Member Author

Reopening it to work on adding Buildah support to VS Code Kubernetes Tools extension upstream project.

@azatsarynnyy
Copy link
Member Author

azatsarynnyy commented Jun 21, 2019

Buildah support has been added to VS Code Kubernetes extension vscode-kubernetes-tools/vscode-kubernetes-tools#559

It's included to the recently published v1.0.1

The next steps are:

@l0rd l0rd added severity/P2 Has a minor but important impact to the usage or development of the system. kind/enhancement A feature request - must adhere to the feature request template. and removed kind/task Internal things, technical debt, and to-do tasks to be performed. labels Aug 29, 2019
@vparfonov vparfonov added this to the 7.3.0 milestone Oct 2, 2019
@l0rd l0rd added the status/in-progress This issue has been taken by an engineer and is under active development. label Oct 11, 2019
@azatsarynnyy
Copy link
Member Author

depends on #13702

@vparfonov vparfonov modified the milestones: 7.3.0, Backlog - IDE 1 Oct 23, 2019
@azatsarynnyy
Copy link
Member Author

Fixed for K8s in eclipse-che/che-theia#510
For OpenShift, will be a separate issue if needed.

@RomanNikitenko RomanNikitenko removed the status/in-progress This issue has been taken by an engineer and is under active development. label Oct 28, 2019
@vparfonov vparfonov modified the milestones: Backlog - IDE 1, 7.4.0 Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
5 participants