Skip to content

incorrect deployment selected when multiple in namespace #5

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

Closed
zswanson opened this issue Sep 11, 2021 · 1 comment
Closed

incorrect deployment selected when multiple in namespace #5

zswanson opened this issue Sep 11, 2021 · 1 comment

Comments

@zswanson
Copy link
Contributor

Using the example in the readme I've attempted to create a migration object. The controller seems to be selecting random deployments from the same namespace despite the label selector and the target deployment matching correctly.

In this example below I'm just trying to get the job to launch with a simple sleep command just to prove that it works. A deployment named frs with labels app=frs, component=api is deployed in the default namespace, along with 5 other applications. Each has a unique app label though.

apiVersion: migrations.coderanger.net/v1beta1
kind: Migrator
metadata:
  name: frs-migration
  namespace: default
spec:
  selector:
    matchLabels:
      app: frs
      component: api
  args:
    - "/usr/bin/sleep 300s"

In the log snippet below the migration controller indicates it is running using an image from a different deployment than the one the label selector should match. The Job pods are terminating very fast due to some other issue, but long enough for me to see that they are in fact copying the spec of the wrong deployment nearly every time. It seems to be random which one is selected.

INFO controllers.migrator.components.user !!! {"object": "default/frs-migration", "last": "", "image": "XXXXXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/myorg/auth:e8a87e2"}

@zswanson
Copy link
Contributor Author

zswanson commented Oct 5, 2021

Determined that this is caused by a bad/earlier image that's published to GCR as the latest tag, but is missing some code changes. A local rebuild from main fixed the problems I was seeing.

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

No branches or pull requests

1 participant