Class: Clusters::KubernetesNamespaceFinder
- Inherits:
-
Object
- Object
- Clusters::KubernetesNamespaceFinder
- Defined in:
- app/finders/clusters/kubernetes_namespace_finder.rb
Instance Attribute Summary collapse
-
#cluster ⇒ Object
readonly
Returns the value of attribute cluster.
-
#environment_name ⇒ Object
readonly
Returns the value of attribute environment_name.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(cluster, project:, environment_name:, allow_blank_token: false) ⇒ KubernetesNamespaceFinder
constructor
A new instance of KubernetesNamespaceFinder.
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
#cluster ⇒ Object (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_name ⇒ Object (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 |
#project ⇒ Object (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
#execute ⇒ Object
14 15 16 |
# File 'app/finders/clusters/kubernetes_namespace_finder.rb', line 14 def execute find_namespace(with_environment: cluster.namespace_per_environment?) end |