Commit f7abde93 authored by Tiago Botelho's avatar Tiago Botelho

Move kubeclient and namespace variables to the private interface

parent eb7c08c7
...@@ -14,7 +14,7 @@ class InternalId < ActiveRecord::Base ...@@ -14,7 +14,7 @@ class InternalId < ActiveRecord::Base
belongs_to :project belongs_to :project
belongs_to :namespace belongs_to :namespace
enum usage: { issues: 0, merge_requests: 1, deployments: 2, milestones: 3, epics: 4, ci_pipelines: 5, prometheus_alerts: 6 } enum usage: { issues: 0, merge_requests: 1, deployments: 2, milestones: 3, epics: 4, ci_pipelines: 5 }
validates :usage, presence: true validates :usage, presence: true
......
...@@ -2,8 +2,6 @@ module Gitlab ...@@ -2,8 +2,6 @@ module Gitlab
module Kubernetes module Kubernetes
module Helm module Helm
class Api class Api
attr_reader :kubeclient, :namespace
def initialize(kubeclient) def initialize(kubeclient)
@kubeclient = kubeclient @kubeclient = kubeclient
@namespace = Gitlab::Kubernetes::Namespace.new(Gitlab::Kubernetes::Helm::NAMESPACE, kubeclient) @namespace = Gitlab::Kubernetes::Namespace.new(Gitlab::Kubernetes::Helm::NAMESPACE, kubeclient)
...@@ -36,6 +34,8 @@ module Gitlab ...@@ -36,6 +34,8 @@ module Gitlab
private private
attr_reader :kubeclient, :namespace
def create_config_map(command) def create_config_map(command)
command.config_map_resource.tap do |config_map_resource| command.config_map_resource.tap do |config_map_resource|
kubeclient.create_config_map(config_map_resource) kubeclient.create_config_map(config_map_resource)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment