dtk_crd_parser 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/crd_parser/component_def.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f98f24fcd2becc8adcaf8b36a37a041415565ea3636973c4c8424cf8515d821
|
4
|
+
data.tar.gz: e87f82212e978fcea0456ebacfd7176452c7c8083cbb400728f454d6e4750cad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab039a38ae744940b4f8a30d105e74400dd2bb6695f2f7410bd3588c05c0b707366b6002de1ef82c48c1477b155a7ce3261be813384f8b35a843105f5a28d69d
|
7
|
+
data.tar.gz: d1a7b393d08726c8bb62a57d0d32c829c42c2b2d7fa57c2c1a9140ad4ab44f04df1d0c91b59337ba5b00be6692b454b751c090b1f2ce397b17af6faff006435e
|
@@ -19,7 +19,9 @@ module DTK::CrdParser
|
|
19
19
|
def self.create_from_kube(client, component_instance, component_def_name)
|
20
20
|
puts 'Component def...'
|
21
21
|
module_name = destructureActionComponent(component_def_name)[:moduleName]
|
22
|
-
|
22
|
+
puts 'Module name: '
|
23
|
+
puts module_name
|
24
|
+
module_ref = resolveModuleReference(component_instance[:metadata][:references][:module_refs], component_def_name, module_name)
|
23
25
|
componentDef = client.get_componentdef(component_def_name, module_ref[:namespace])
|
24
26
|
|
25
27
|
name = componentDef[:metadata][:name]
|
@@ -46,6 +48,7 @@ module DTK::CrdParser
|
|
46
48
|
private
|
47
49
|
|
48
50
|
def self.resolveModuleReference(module_refs, component_full_name, module_name)
|
51
|
+
raise "There are no module refs for component #{component_full_name} in component instance." if module_refs.nil?
|
49
52
|
module_ref = module_refs.find { |module_ref| module_ref[:name].gsub!('_', '-') == module_name.gsub!('_', '-') }
|
50
53
|
if(module_ref.nil?)
|
51
54
|
raise "Could not resolve module reference for component #{component_full_name} in component instance. Expected to find: #{module_name}"
|