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

Support running a DevWorkspace container components as ephemeral containers of an existing Pod #1328

Open
l0rd opened this issue Oct 16, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@l0rd
Copy link
Collaborator

l0rd commented Oct 16, 2024

Description

In the same vein as the command kubectl debug <mypod> --image <myimage>, that adds a new debug container to the existing pod mypod, we would like to support the use case of starting the CDE containers in an existing Pod.

image

Initially we could should use an attribute to rapidly have the functionality and iterate if there are other things to add (i.e. Pod selector). Pod overrides, init containers etc...should be ignored as the Pod spec should not be changed. Specifying the target-pod-container is critical to support the process namespace sharing that allows attaching the IDE debugger to a process running in that container (this is the parameter --target of kubectl debug).

kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: 
spec:
  routingClass: che
  started: true
  template:
    attributes:
+     controller.devfile.io/target-pod: <podname>
+     controller.devfile.io/target-pod-container: <containername>
    projects:
      - name: outyet
        git:
          remotes:
            origin: https://github.com/l0rd/outyet.git
    components:
      - name: dev-tooling
        container:
          image: ghcr.io/l0rd/outyet-dev:latest
          memoryRequest: 2G
          memoryLimit: 10G
          cpuRequest: '1'
          cpuLimit: '4'
  contributions:
    - name: che-code
      uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
      components:
        - name: che-code-runtime-description
          container:
            env:
              - name: CODE_HOST
                value: 0.0.0.0

Additional context

KCD Austria presentation slides

@AObuchow AObuchow added the enhancement New feature or request label Oct 16, 2024
@ibuziuk
Copy link
Contributor

ibuziuk commented Oct 17, 2024

@l0rd great slides
I feel like this feature can shine on the OpenShift Topology view (extra "Debug" ConsoleLink for running pods)
Screenshot 2024-10-17 at 12 34 10

@AObuchow AObuchow changed the title Support running a DevWorksapce container components as ephemeral containers of an existing Pod Support running a DevWorkspace container components as ephemeral containers of an existing Pod Oct 21, 2024
@ibuziuk ibuziuk self-assigned this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants