Class: Pangea::Kubernetes::Architecture::AwsEksIamResult

Inherits:
IamResult
  • Object
show all
Defined in:
lib/pangea/kubernetes/architecture.rb

Overview

AWS EKS-specific IamResult with cluster_role, cluster_policy_attachment, and node_role

Instance Attribute Summary collapse

Attributes inherited from IamResult

#ec2_policy, #ecr_policy, #etcd_policy, #karpenter_profile, #karpenter_role, #log_group, #logs_policy, #persistent_state_policy, #ssm_policy

Instance Method Summary collapse

Methods inherited from IamResult

#initialize

Constructor Details

This class inherits a constructor from Pangea::Kubernetes::Architecture::IamResult

Instance Attribute Details

#cluster_policy_attachmentObject

Returns the value of attribute cluster_policy_attachment.



283
284
285
# File 'lib/pangea/kubernetes/architecture.rb', line 283

def cluster_policy_attachment
  @cluster_policy_attachment
end

#cluster_roleObject

Returns the value of attribute cluster_role.



283
284
285
# File 'lib/pangea/kubernetes/architecture.rb', line 283

def cluster_role
  @cluster_role
end

#node_roleObject

Returns the value of attribute node_role.



283
284
285
# File 'lib/pangea/kubernetes/architecture.rb', line 283

def node_role
  @node_role
end

Instance Method Details

#[](key) ⇒ Object



285
286
287
288
289
290
291
292
# File 'lib/pangea/kubernetes/architecture.rb', line 285

def [](key)
  case key.to_sym
  when :cluster_role then cluster_role
  when :cluster_policy_attachment then cluster_policy_attachment
  when :node_role then node_role
  else super
  end
end

#to_hObject



294
295
296
297
298
299
300
# File 'lib/pangea/kubernetes/architecture.rb', line 294

def to_h
  hash = super
  hash[:cluster_role] = cluster_role if cluster_role
  hash[:cluster_policy_attachment] = cluster_policy_attachment if cluster_policy_attachment
  hash[:node_role] = node_role if node_role
  hash
end