Class: Gitlab::Kubernetes::Helm::Pod

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/kubernetes/helm/pod.rb

Instance Method Summary collapse

Constructor Details

#initialize(command, namespace_name, service_account_name: nil) ⇒ Pod

Returns a new instance of Pod.


7
8
9
10
11
# File 'lib/gitlab/kubernetes/helm/pod.rb', line 7

def initialize(command, namespace_name, service_account_name: nil)
  @command = command
  @namespace_name = namespace_name
  @service_account_name = 
end

Instance Method Details

#generateObject


13
14
15
16
17
18
19
20
21
# File 'lib/gitlab/kubernetes/helm/pod.rb', line 13

def generate
  spec = { containers: [container_specification], restartPolicy: 'Never' }

  spec[:volumes] = volumes_specification
  spec[:containers][0][:volumeMounts] = volume_mounts_specification
  spec[:serviceAccountName] =  if 

  ::Kubeclient::Resource.new(metadata: , spec: spec)
end