Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/kubernetes/helm/base_command.rb')
-rw-r--r--lib/gitlab/kubernetes/helm/base_command.rb31
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/gitlab/kubernetes/helm/base_command.rb b/lib/gitlab/kubernetes/helm/base_command.rb
index 31cd21f17e0..f27ad05599e 100644
--- a/lib/gitlab/kubernetes/helm/base_command.rb
+++ b/lib/gitlab/kubernetes/helm/base_command.rb
@@ -3,7 +3,24 @@
module Gitlab
module Kubernetes
module Helm
- module BaseCommand
+ class BaseCommand
+ attr_reader :name, :files
+
+ def initialize(rbac:, name:, files:, local_tiller_enabled:)
+ @rbac = rbac
+ @name = name
+ @files = files
+ @local_tiller_enabled = local_tiller_enabled
+ end
+
+ def rbac?
+ @rbac
+ end
+
+ def local_tiller_enabled?
+ @local_tiller_enabled
+ end
+
def pod_resource
pod_service_account_name = rbac? ? service_account_name : nil
@@ -46,18 +63,6 @@ module Gitlab
files.keys
end
- def name
- raise "Not implemented"
- end
-
- def rbac?
- raise "Not implemented"
- end
-
- def files
- raise "Not implemented"
- end
-
private
def files_dir