Class: KubeQueue::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/kube_queue/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#auth_tokenObject

Returns the value of attribute auth_token.



12
13
14
# File 'lib/kube_queue/client.rb', line 12

def auth_token
  @auth_token
end

#ssl_ca_fileObject

Returns the value of attribute ssl_ca_file.



12
13
14
# File 'lib/kube_queue/client.rb', line 12

def ssl_ca_file
  @ssl_ca_file
end

#urlObject

Returns the value of attribute url.



12
13
14
# File 'lib/kube_queue/client.rb', line 12

def url
  @url
end

Instance Method Details

#create_job(manifest) ⇒ Object



6
7
8
9
10
# File 'lib/kube_queue/client.rb', line 6

def create_job(manifest)
  job = K8s::Resource.new(manifest)
  job..namespace = 'default'
  client.api('batch/v1').resource('jobs').create_resource(job)
end