Class: Devfile::Parser
- Inherits:
-
Object
- Object
- Devfile::Parser
- Defined in:
- lib/devfile.rb
Overview
Set of services to parse a devfile and output k8s manifests
Constant Summary collapse
- DEVFILE_GEMSPEC =
Gem.loaded_specs['devfile']
- ARCH =
RUBY_CPU_TO_GOARCH[Gem::Platform.local.cpu] || Gem::Platform.local.cpu
- SYSTEM_PLATFORM =
"#{ARCH}-#{Gem::Platform.local.os}"- FILE_PATH =
File.("./../out/devfile-#{SYSTEM_PLATFORM}", File.dirname(__FILE__))
Class Method Summary collapse
- .flatten(devfile) ⇒ Object
- .get_all(devfile, name, namespace, labels, annotations, replicas, domain_template, ingress_class) ⇒ Object
- .get_deployment(devfile, name, namespace, labels, annotations, replicas) ⇒ Object
- .get_ingress(devfile, name, namespace, labels, annotations, domain_template, ingress_class) ⇒ Object
- .get_pvc(devfile, name, namespace, labels, annotations) ⇒ Object
- .get_service(devfile, name, namespace, labels, annotations) ⇒ Object
Class Method Details
.flatten(devfile) ⇒ Object
39 40 41 |
# File 'lib/devfile.rb', line 39 def flatten(devfile) call('flatten', devfile) end |
.get_all(devfile, name, namespace, labels, annotations, replicas, domain_template, ingress_class) ⇒ Object
35 36 37 |
# File 'lib/devfile.rb', line 35 def get_all(devfile, name, namespace, labels, annotations, replicas, domain_template, ingress_class) call('all', devfile, name, namespace, labels, annotations, replicas, domain_template, ingress_class) end |
.get_deployment(devfile, name, namespace, labels, annotations, replicas) ⇒ Object
19 20 21 |
# File 'lib/devfile.rb', line 19 def get_deployment(devfile, name, namespace, labels, annotations, replicas) call('deployment', devfile, name, namespace, labels, annotations, replicas) end |
.get_ingress(devfile, name, namespace, labels, annotations, domain_template, ingress_class) ⇒ Object
27 28 29 |
# File 'lib/devfile.rb', line 27 def get_ingress(devfile, name, namespace, labels, annotations, domain_template, ingress_class) call('ingress', devfile, name, namespace, labels, annotations, domain_template, ingress_class) end |
.get_pvc(devfile, name, namespace, labels, annotations) ⇒ Object
31 32 33 |
# File 'lib/devfile.rb', line 31 def get_pvc(devfile, name, namespace, labels, annotations) call('deployment', devfile, name, namespace, labels, annotations) end |
.get_service(devfile, name, namespace, labels, annotations) ⇒ Object
23 24 25 |
# File 'lib/devfile.rb', line 23 def get_service(devfile, name, namespace, labels, annotations) call('service', devfile, name, namespace, labels, annotations) end |