Class: Pangea::Kubernetes::Types::ControlPlaneConfig

Inherits:
Resources::BaseAttributes
  • Object
show all
Defined in:
lib/pangea/kubernetes/types/control_plane_config.rb

Overview

Control plane configuration for blackmatter-kubernetes NixOS modules. Maps to ‘controlPlane.*` options in the NixOS module. Only relevant for vanilla Kubernetes (k3s manages its own control plane).

Instance Method Summary collapse

Instance Method Details

#to_hObject



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/pangea/kubernetes/types/control_plane_config.rb', line 47

def to_h
  hash = {}
  hash[:api_server_extra_args] = api_server_extra_args if api_server_extra_args.any?
  hash[:api_server_extra_sans] = api_server_extra_sans if api_server_extra_sans.any?
  hash[:controller_manager_extra_args] = controller_manager_extra_args if controller_manager_extra_args.any?
  hash[:scheduler_extra_args] = scheduler_extra_args if scheduler_extra_args.any?
  hash[:disable_kube_proxy] = disable_kube_proxy if disable_kube_proxy
  hash[:kube_proxy_extra_args] = kube_proxy_extra_args if kube_proxy_extra_args.any?
  hash[:etcd_external] = etcd_external if etcd_external
  hash[:etcd_endpoints] = etcd_endpoints if etcd_endpoints.any?
  hash[:etcd_ca_file] = etcd_ca_file if etcd_ca_file
  hash[:etcd_cert_file] = etcd_cert_file if etcd_cert_file
  hash[:etcd_key_file] = etcd_key_file if etcd_key_file
  hash
end