Class: Clusters::KubernetesNamespaceFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/clusters/kubernetes_namespace_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster, project:, environment_name:, allow_blank_token: false) ⇒ KubernetesNamespaceFinder

Returns a new instance of KubernetesNamespaceFinder.



7
8
9
10
11
12
# File 'app/finders/clusters/kubernetes_namespace_finder.rb', line 7

def initialize(cluster, project:, environment_name:, allow_blank_token: false)
  @cluster = cluster
  @project = project
  @environment_name = environment_name
  @allow_blank_token = allow_blank_token
end

Instance Attribute Details

#clusterObject (readonly)

Returns the value of attribute cluster.



5
6
7
# File 'app/finders/clusters/kubernetes_namespace_finder.rb', line 5

def cluster
  @cluster
end

#environment_nameObject (readonly)

Returns the value of attribute environment_name.



5
6
7
# File 'app/finders/clusters/kubernetes_namespace_finder.rb', line 5

def environment_name
  @environment_name
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'app/finders/clusters/kubernetes_namespace_finder.rb', line 5

def project
  @project
end

Instance Method Details

#executeObject



14
15
16
# File 'app/finders/clusters/kubernetes_namespace_finder.rb', line 14

def execute
  find_namespace(with_environment: cluster.namespace_per_environment?)
end