Deploy board: Pod(s) are displaying N times
Summary
A customer (https://gitlab.zendesk.com/agent/tickets/131113) is reporting the same pod(s) displayed N times in a deploy board
This can happen when there are multiple matching Deployments
in the same namespace
Steps to reproduce
- Have GitLab Premium for the group/instance
- Deploy two matching deployments into the same namespace. For argument's sake, each deployment has 2 pods
- Go to Deploy board for the project
- Observe deploy board for the namespace display
8
pods.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
Pods is doubled up N times where N is number of matching namespaces
What is the expected correct behavior?
We only see the actual number of pods in the deploy board
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
In https://gitlab.com/gitlab-org/gitlab-ee/blob/3eb9dcb4313d24deeaf34a9bb4d7eb87ba8c8daf/ee/lib/gitlab/kubernetes/rollout_status.rb#L33-38, don't pass in set of matching pods (regardless which deployment they are for) into each deployment
.
Rather, create each deployment with its own set of pods. This may require data[:pods]
to know which deployment
it is for