Class: OodCore::Job::Adapters::Kubernetes::Resources::ConfigMap

Inherits:
Object
  • Object
show all
Defined in:
lib/ood_core/job/adapters/kubernetes/resources.rb

Overview

Utility class for kubernetes configmap objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, files) ⇒ ConfigMap

Returns a new instance of ConfigMap.



6
7
8
9
10
11
12
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 6

def initialize(name, files)
  @name = name
  @files = []
  files.each do |f|
    @files << ConfigMapFile.new(f)
  end
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



4
5
6
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 4

def files
  @files
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 4

def name
  @name
end

Instance Method Details

#init_mounts?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 18

def init_mounts?
  @files.any? { |f| f.init_mount_path }
end

#mounts?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 14

def mounts?
  @files.any? { |f| f.mount_path }
end