Skip to content

When using multiple replica for a deployment, synchronization only applies to one pod #1250

@timofriedlberlin

Description

@timofriedlberlin

What happened?
I am using a deployment with multiple replicas:

- name: proxy
    helm:
      componentChart: true
      values:
        replicas: 2
        containers:
          - image: proxy

After changing some source files for the project, the application rebuilds and the sync is triggered.
But, only one of the Pods will be synchronized and restarted.

What did you expect to happen instead?
When using something like

sync:
    - labelSelector:
        app.kubernetes.io/component: proxy
      excludePaths:
        - .git/
        - src/
      uploadExcludePaths:
        - devspace.yaml
      onUpload:
        restartContainer: true
      waitInitialSync: true

I would expect all pods to be synchronized matching the label selector.

How can we reproduce the bug? (as minimally and precisely as possible)
Create some setup which verifies synchronization works, then change deployment.replicas > 1

Local Environment:

  • DevSpace Version: 5.5.0
  • Operating System: linux
  • Deployment method: helm
    Kubernetes Cluster:
  • Cloud Provider: k3s
  • Kubernetes Version: v1.19.4

Anything else we need to know?

/kind bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/syncIssues related to the real-time code synchronizationkind/featureNew feature or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions