dtk_crd_parser 0.0.106 → 0.0.107
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a233391303f4495f2e22959a124be17cafa736dd9c4d9e2708855c56b226322
|
4
|
+
data.tar.gz: dadf79a5a916f2438554dbb3eb64af010b41f70c78f9811b00504c36f6cc1fb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03cf8dba3a5d4d89b9299f68662846cbe7f3873518bbd86f47a698d7e54e91587a84a67654c4f98041f11d33edebdf755f59858b35a02f5c16a7f61ac860e717
|
7
|
+
data.tar.gz: b44886601604297c7e3f6e47ffdb2a12cda625a1efc2a27f24d47e98ceb60923aabc012a0e8398d85b5fb466133ca16360ab071fd9442f88cf847445adf9d993
|
@@ -16,14 +16,16 @@ module DTK::CrdParser
|
|
16
16
|
component_obj = Component.create_from_kube(client, component_instance, component_name)
|
17
17
|
actions = component_obj.component_def.executable_actions
|
18
18
|
executable_actions = Hash.new
|
19
|
-
actions
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
if actions
|
20
|
+
actions.to_hash.each do |name, action|
|
21
|
+
params = {
|
22
|
+
name: name.to_s,
|
23
|
+
entrypoint: action[:entrypoint] || "",
|
24
|
+
type: action[:type] || "",
|
25
|
+
bash_script: action[:bash_script] || ""
|
26
|
+
}
|
27
|
+
executable_actions[name.to_sym] = ExecutableAction.new(params)
|
28
|
+
end
|
27
29
|
end
|
28
30
|
executable_actions
|
29
31
|
end
|
@@ -28,6 +28,8 @@ module DTK::CrdParser
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def decrypt_if_encrypted(data_to_decrypt, encrypted)
|
31
|
+
Logger.new('/proc/1/fd/1').info "Encrypted is: #{encrypted}"
|
32
|
+
Logger.new('/proc/1/fd/1').info "Data to decrypt is is: #{data_to_decrypt}"
|
31
33
|
return nil unless data_to_decrypt
|
32
34
|
return data_to_decrypt unless encrypted
|
33
35
|
#get secret to get the key
|
data/lib/crd_parser/component.rb
CHANGED
@@ -21,7 +21,7 @@ module DTK::CrdParser
|
|
21
21
|
component_attributes = getComponentAttributes(component_name, component_instance_obj[:spec][:components])
|
22
22
|
attributes = []
|
23
23
|
if component_attributes
|
24
|
-
component_attributes.to_hash.each do |attribute_name, attribute_value|
|
24
|
+
(component_attributes.to_hash || []).each do |attribute_name, attribute_value|
|
25
25
|
attribute_type_info = (component_def.attribute_type_info
|
26
26
|
.select {|attribute| attribute.name == attribute_name.to_s} || []).first
|
27
27
|
encrypted = attribute_type_info.encrypted if attribute_type_info
|
@@ -35,7 +35,7 @@ module DTK::CrdParser
|
|
35
35
|
protected
|
36
36
|
|
37
37
|
def self.getComponentAttributes(fullComponentName, components)
|
38
|
-
component = components.each do |component|
|
38
|
+
component = (components || []).each do |component|
|
39
39
|
componentObj = component[fullComponentName]
|
40
40
|
if(componentObj && componentObj.is_a?(Kubeclient::Resource))
|
41
41
|
return componentObj[:attributes]
|
@@ -28,6 +28,8 @@ module DTK::CrdParser
|
|
28
28
|
resourceVersion = componentMetadata[:resourceVersion]
|
29
29
|
|
30
30
|
componentDefSpec = componentDef[:spec] || {}
|
31
|
+
Logger.new('/proc/1/fd/1').info "Component def spec is: : #{componentDefSpec}"
|
32
|
+
|
31
33
|
if destructured_component[:action] && componentDefSpec[:actions]
|
32
34
|
componentDefAction = componentDefSpec[:actions][destructured_component[:action].to_sym]
|
33
35
|
else
|