Move cluster/kubernetes.rb file
What does this MR do?
This is follow up to this discussions
In this MR file with Cluster::Kubernetes
module is moved so it's path matches it's namespace and due to that it can be correctly loaded. There were issues with missing constants in development mode, caused by this mismatch.
[21] pry(main)> Clusters::Kubernetes::KNATIVE_SERVING_NAMESPACE
NameError: uninitialized constant Clusters::Kubernetes::KNATIVE_SERVING_NAMESPACE
from /Users/mikolajwawrzyniak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `block in load_missing_constant'
[22] pry(main)> Clusters::Kubernetes
=> Clusters::Kubernetes
[23] pry(main)> Clusters::Kubernetes::KNATIVE_SERVING_NAMESPACE
NameError: uninitialized constant Clusters::Kubernetes::KNATIVE_SERVING_NAMESPACE
from /Users/mikolajwawrzyniak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `block in load_missing_constant'
[24] pry(main)> Clusters::Kubernetes::Kubernetes
LoadError: Unable to autoload constant Clusters::Kubernetes::Kubernetes, expected /Users/mikolajwawrzyniak/gitlab/gitlab-development-kit/gitlab/app/services/clusters/kubernetes/kubernetes.rb to define it
from /Users/mikolajwawrzyniak/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:511:in `load_missing_constant'
[25] pry(main)> Clusters::Kubernetes::KNATIVE_SERVING_NAMESPACE
=> "knative-serving"
[26] pry(main)>
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team