Class: Pangea::Kubernetes::Types::EtcdConfig
- Inherits:
-
Resources::BaseAttributes
- Object
- Resources::BaseAttributes
- Pangea::Kubernetes::Types::EtcdConfig
- Defined in:
- lib/pangea/kubernetes/types/etcd_config.rb
Overview
Etcd configuration for blackmatter-kubernetes NixOS modules. Maps to ‘etcd.*` options in the NixOS module. Only relevant for vanilla Kubernetes (k3s embeds etcd).
Instance Method Summary collapse
Instance Method Details
#external? ⇒ Boolean
43 44 45 |
# File 'lib/pangea/kubernetes/types/etcd_config.rb', line 43 def external? external_endpoints.any? end |
#to_h ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/pangea/kubernetes/types/etcd_config.rb', line 47 def to_h hash = { initial_cluster_state: initial_cluster_state, data_dir: data_dir } hash[:external_endpoints] = external_endpoints if external_endpoints.any? hash[:snapshot_count] = snapshot_count if snapshot_count hash[:heartbeat_interval] = heartbeat_interval if heartbeat_interval hash[:election_timeout] = election_timeout if election_timeout hash[:ca_file] = ca_file if ca_file hash[:cert_file] = cert_file if cert_file hash[:key_file] = key_file if key_file hash end |