Skip to content

Move cluster/kubernetes.rb file

Mikołaj Wawrzyniak requested to merge fix_clusters_kubernetes_namespacing into master

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

Availability and Testing

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

Merge request reports