Class: Clusters::Kubernetes::CreateOrUpdateNamespaceService

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

Instance Method Summary collapse

Constructor Details

#initialize(cluster:, kubernetes_namespace:) ⇒ CreateOrUpdateNamespaceService

Returns a new instance of CreateOrUpdateNamespaceService.


6
7
8
9
10
# File 'app/services/clusters/kubernetes/create_or_update_namespace_service.rb', line 6

def initialize(cluster:, kubernetes_namespace:)
  @cluster = cluster
  @kubernetes_namespace = kubernetes_namespace
  @platform = cluster.platform
end

Instance Method Details

#executeObject


12
13
14
15
16
17
# File 'app/services/clusters/kubernetes/create_or_update_namespace_service.rb', line 12

def execute
  
  configure_kubernetes_token

  kubernetes_namespace.save!
end