Class: Pangea::Kubernetes::Architecture::ArchitectureResult
- Inherits:
-
Contracts::ArchitectureResult
- Object
- Contracts::ArchitectureResult
- Pangea::Kubernetes::Architecture::ArchitectureResult
- Defined in:
- lib/pangea/kubernetes/architecture.rb
Overview
Result object from kubernetes_cluster() — holds all created references. Inherits from base contract; provider-specific to_h calls config methods that the typed ClusterConfig provides.
Instance Method Summary collapse
-
#cluster=(value) ⇒ Object
Override cluster= to wrap in the local ClusterResult subclass (not the base Pangea::Contracts::ClusterResult).
- #to_h ⇒ Object
Instance Method Details
#cluster=(value) ⇒ Object
Override cluster= to wrap in the local ClusterResult subclass (not the base Pangea::Contracts::ClusterResult)
359 360 361 362 363 364 365 |
# File 'lib/pangea/kubernetes/architecture.rb', line 359 def cluster=(value) @cluster = if value.is_a?(Pangea::Contracts::ClusterResult) value elsif value ClusterResult.new(value) end end |
#to_h ⇒ Object
367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/pangea/kubernetes/architecture.rb', line 367 def to_h { name: name, backend: config.backend, kubernetes_version: config.kubernetes_version, region: config.region, managed_kubernetes: config.managed_kubernetes?, cluster: cluster&.to_h, network: network_to_h, iam: iam_to_h, node_pools: node_pools.transform_values { |np| np.respond_to?(:to_h) ? np.to_h : np } } end |