devspace
devspace copied to clipboard
Deploy job while `devspace dev` is running
What happened?
I'm trying to deploy a kubernetes job with devspace 6 while devspace dev is running.
devspace devdevspace deploy -p xyz-my-job-generaterun_dependencies: couldn't execute 'devspace deploy -p xyz-my-job-generate', because there is another DevSpace session for the project (xyz) already running inside this namespace
What did you expect to happen instead?
The job inside profile xyz-my-job-generate will be deployed.
How can we reproduce the bug? (as minimally and precisely as possible)
- the easiest way to generate this case
- run twice
devspace devin separate consoles
- run twice
- In my case:
- run
devspace devin one console - run
devspace deploy -p xyz-my-job-generatein another console
My devspace.yaml:
version: v2beta1
name: xyz
vars:
PHP_IMAGE: "xyz-webapp-php"
PHP_MY_JOB_IMAGE: "xyz-my-job"
NGINX_IMAGE: "xyz-webapp-nginx"
deployments:
webapp:
namespace: xyz-dev
kubectl:
manifests:
- kustomize/overlays/dev/webapp/
kustomize: true
dev:
php:
imageSelector: '${PHP_IMAGE}'
sync:
- path: ./:/app
excludePaths:
- .git/
- .idea/
- .devspace/
- var
- docker
- terraform
- k8s
uploadExcludePaths:
- node_modules
initialSync: preferLocal
printLogs: true
logs: { }
nginx:
imageSelector: '${NGINX_IMAGE}'
sync:
- path: ./public:app/public
initialSync: preferLocal
disableDownload: true
printLogs: true
logs: { }
profiles:
- name: xyz-my-job-generate
replace:
images:
php:
image: '${PHP_MY_JOB_IMAGE}'
tags:
- 'dev-php-my-job-${DEVSPACE_GIT_COMMIT}-${DEVSPACE_TIMESTAMP}'
dockerfile: docker/web/Dockerfile
context: .
target: php-dev
buildKit: { }
deployments:
xyz-my-job-generate:
namespace: xyz-dev
kubectl:
manifests:
- kustomize/overlays/dev/my-job/
kustomize: true
images:
php:
image: '${PHP_IMAGE}'
tags:
- 'dev-php-${DEVSPACE_GIT_COMMIT}-#####'
dockerfile: docker/web/Dockerfile
context: .
target: php-dev
buildKit: { }
nginx:
image: '${NGINX_IMAGE}'
tags:
- 'dev-nginx-${DEVSPACE_GIT_COMMIT}-#####'
dockerfile: docker/web/Dockerfile
context: .
target: nginx-dev
buildKit: { }
...
Local Environment:
- DevSpace Version:
devspace version 6.2.5 - Operating System:
linux - ARCH of the OS:
AMD64Kubernetes Cluster: - Cloud Provider:
minikube - Kubernetes Version:
Client Version: v1.24.3 Kustomize Version: v4.5.4 Server Version: v1.22.12
Anything else we need to know?
It works in devspace 5
pkg/devspace/pipeline/pipeline.go:108
Hello! Thanks for reporting this issue. We will look into a fix, since this worked in DevSpace v5.