Skip to content

Conversation

@jLopezbarb
Copy link
Contributor

…te dependencies

  • Switched from github.com/mitchellh/go-ps to github.com/shirou/gopsutil/v3 for improved process handling.
  • Updated the process handling logic to accommodate the new library, including changes to process checks and logging.

How to test:

Before testing the scenario you will need to create an image for this branch

  1. Run okteto build -t $YOURCUSTOMIMAGE -f Dockerfile
    Remember to run export OKTETO_LOCAL_REGISTRY_STORE_PRIORITY_ENABLED=true if you're pushing to an external registry

  2. Clone go-getting-started-repo

  3. Apply the following patch:

diff --git k8s.yml k8s.yml
index f2b8036..d7c4bef 100644
--- k8s.yml
+++ k8s.yml
@@ -12,6 +12,7 @@ spec:
       labels:
         app: hello-world
     spec:
+      shareProcessNamespace: true
       containers:
       - image: okteto/go-getting-started:hello-world
         name: hello-world
  1. Run okteto deploy
  2. Run okteto up and check that is failing
  3. Run okteto down -v
  4. Run export OKTETO_BIN=$YOURCUSTOMIMAGE
  5. Run okteto up and check that is working

…te dependencies

- Switched from `github.com/mitchellh/go-ps` to `github.com/shirou/gopsutil/v3` for improved process handling.
- Added several indirect dependencies for enhanced functionality.
- Updated the process handling logic to accommodate the new library, including changes to process checks and logging.

Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb marked this pull request as draft December 3, 2025 17:05
@jLopezbarb
Copy link
Contributor Author

Scenarios tested:

  • Simple up with and without the shareProcessNamespace
  • Check that is removing previous process running okteto up then exiting (sleep 5000 & && exit) and okteto up again
  • Check that running a second terminal is working

@jLopezbarb jLopezbarb marked this pull request as ready for review December 4, 2025 12:16
@jLopezbarb jLopezbarb merged commit caad45e into master Dec 4, 2025
1 of 2 checks passed
@jLopezbarb jLopezbarb deleted the jlo/fix-clean-with-share-process-name branch December 4, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants