class DTK::State::ComponentDef

Constants

COMPONENT_DEF_CRD_VERSION

Attributes

attribute_type_info[R]
executable_actions[R]
name[R]
namespace[R]

Public Class Methods

get(namespace, name, opts = {}) click to toggle source
# File lib/state/component_def.rb, line 16
def self.get(namespace, name, opts = {})
  opts[:apiVersion] = COMPONENT_DEF_CRD_VERSION
  crd_component_def = ::DTK::CrdClient.get_kubeclient(opts).get_componentdef(name, namespace)
  ComponentDef.new(namespace, name, crd_component_def)
end
new(namespace, name, content) click to toggle source
# File lib/state/component_def.rb, line 9
def initialize(namespace, name, content)
  @name                = name
  @namespace           = namespace
  @executable_actions  = content[:spec][:actions] || {}
  @attribute_type_info  = AttributeTypeInfo.create_from_kube_hash(content[:spec][:attributes] || {})
end