dtk_crd_parser 0.0.71 → 0.0.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crd_parser/component.rb +3 -10
- data/lib/crd_parser/component_def/attribute_type_info.rb +0 -2
- 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: 2c4ebcaef95a04ea97d288e150636aa4398e3068c4213c298697de62dc7b24de
|
4
|
+
data.tar.gz: 064b3b7a39c26b585054574388f636e16572d97dfe6873909314679193b70618
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6dbe7fcce007e8ce304085d044fbc405eb8379d78b4f41125676586bbc124595a1aa9ae5a82528ae2cab2d394101e08557377c2d75b7902b425ee05a88211e0
|
7
|
+
data.tar.gz: 33f972ffbb471700dcf0281432b49d3b18f519a4866211d360e4b5ab3991d3e223317e49699bc411527f044baa65e26d2f54b66eaccb1cbf45274aaf5a9aad1c
|
data/lib/crd_parser/component.rb
CHANGED
@@ -15,23 +15,16 @@ module DTK::CrdParser
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.create_from_kube(client, component_instance, component_name)
|
18
|
-
Logger.new('/proc/1/fd/1').info "CREATE FROM KUBE"
|
19
|
-
|
20
18
|
component_name.gsub!('_', '-')
|
21
|
-
Logger.new('/proc/1/fd/1').info component_name
|
22
|
-
|
23
19
|
component_instance_obj = client.get_component(component_instance[:name], component_instance[:namespace])
|
24
|
-
Logger.new('/proc/1/fd/1').info "component_instance"
|
25
|
-
|
26
20
|
component_def = ComponentDef.create_from_kube(client, component_instance_obj, component_name)
|
27
21
|
component_attributes = getComponentAttributes(component_name, component_instance_obj[:spec][:components])
|
28
22
|
attributes = []
|
29
23
|
if component_attributes
|
30
24
|
component_attributes.to_hash.each do |attribute_name, attribute_value|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
encrypted = attrs.select { |attribute|
|
25
|
+
Logger.new('/proc/1/fd/1').info component_def
|
26
|
+
encrypted = component_def.attribute_type_info
|
27
|
+
.select { |attribute|
|
35
28
|
attribute[:name] == attribute_name
|
36
29
|
}.first[:encrypted] || false
|
37
30
|
attributes.push Attribute.create_from_kube(attribute_name, attribute_value, {encrypted: encrypted})
|
@@ -5,8 +5,6 @@ module DTK::CrdParser
|
|
5
5
|
attr_reader :name, :type, :required, :dynamic, :encrypted
|
6
6
|
|
7
7
|
def initialize(params)
|
8
|
-
Logger.new('/proc/1/fd/1').info "AttrTypeInfo params"
|
9
|
-
Logger.new('/proc/1/fd/1').info params
|
10
8
|
@name = params[:name]
|
11
9
|
@type = params[:type]
|
12
10
|
@required = params[:required] || false
|