Elasticsearch rake tasks should respect new elasticsearch limited namespaces / projects functionality
Summary
Running rake tasks like rake gitlab:elastic:index_database
or rake gitlab:elastic:index_repositories
with "elasticsearch limited namespaces / projects" enabled will index every project, rather than just those restricted ones
Steps to reproduce
Enable elasticsearch limited projects, set to a single project, run the indexing rake tasks
What is the current bug behavior?
All projects are indexed
What is the expected correct behavior?
With limiting enabled, only those projects that are in the approved set should be indexed.
Removal / emptying can still operate on the entire set, though.
Output of checks
This bug happens on staging.GitLab.com
Possible fixes
https://gitlab.com/gitlab-org/gitlab-ee/blob/master/ee/lib/tasks/gitlab/elastic.rake