Class: Clusters::BuildKubernetesNamespaceService

Inherits:
Object
  • Object
show all
Defined in:
app/services/clusters/build_kubernetes_namespace_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster, environment:) ⇒ BuildKubernetesNamespaceService

Returns a new instance of BuildKubernetesNamespaceService.



7
8
9
10
# File 'app/services/clusters/build_kubernetes_namespace_service.rb', line 7

def initialize(cluster, environment:)
  @cluster = cluster
  @environment = environment
end

Instance Attribute Details

#clusterObject (readonly)

Returns the value of attribute cluster.



5
6
7
# File 'app/services/clusters/build_kubernetes_namespace_service.rb', line 5

def cluster
  @cluster
end

#environmentObject (readonly)

Returns the value of attribute environment.



5
6
7
# File 'app/services/clusters/build_kubernetes_namespace_service.rb', line 5

def environment
  @environment
end

Instance Method Details

#executeObject



12
13
14
# File 'app/services/clusters/build_kubernetes_namespace_service.rb', line 12

def execute
  cluster.kubernetes_namespaces.build(attributes)
end