Skip to content

Adding noWatch: true prevents ssh injection #3005

@mueslo

Description

@mueslo

What happened?
I configured a devspace.yaml, but for some reason the SSH server injection never happened, despite the ssh: section being present and all similar devspace.yamls working fine.

What did you expect to happen instead?
SSH server injection happens and SSH server and forwarding starts, i.e. the devspace dev command yields the following lines at the end:

dev:my-project ssh   Port forwarding started on: 11791 -> 8022
dev:my-project ssh   Use 'ssh my-project.devspace' to connect via SSH

How can we reproduce the bug? (as minimally and precisely as possible)

Through painful hours of trial and error I figured out that the bug was caused by adding a sync configuration that had noWatch: true set.

My devspace.yaml:

---
version: v2beta1
name: my-project

vars:
  DEVSPACE_ENV_FILE: ".env"

# deploy a simple pod
deployments:
  umsatzprognose-minimal-devspace:
    kubectl:
      manifests:
        - k8s-deployment.yaml

dev:
  my-project:
    labelSelector:
      app: devspace
      project: my-project
      environment: my-env
    container: devspace
    workingDir: /home/jovyan/
    ssh:
      localHostname: my-project.devspace
    ports:
      - port: 9000:9000
    sync:
      - path: ./pyproject.toml:/home/jovyan/pyproject.toml
        file: true
        #noWatch: true  # random devspace bug: enabling this prevents ssh from starting. ???

Local Environment:

  • DevSpace Version: 6.3.15
  • Operating System: windows
  • ARCH of the OS: AMD64
    Kubernetes Cluster:
  • Cloud Provider: aws
  • Kubernetes Version:
    Client Version: v1.34.1
    Kustomize Version: v5.7.1
    Server Version: v1.29.14+a6b193c

Anything else we need to know?

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions