Class: Porkadot::Configs::KubeletDefault

Inherits:
Object
  • Object
show all
Includes:
Porkadot::ConfigUtils
Defined in:
lib/porkadot/configs/kubelet.rb

Instance Method Summary collapse

Methods included from Porkadot::ConfigUtils

#asset_path, #config, #logger, #method_missing, #raw, #respond_to_missing?, #secrets_path

Constructor Details

#initialize(config) ⇒ KubeletDefault

Returns a new instance of KubeletDefault.



5
6
7
8
# File 'lib/porkadot/configs/kubelet.rb', line 5

def initialize config
  @config = config
  @raw = ::Porkadot::Raw.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Porkadot::ConfigUtils

Instance Method Details

#addon_pathObject



18
19
20
# File 'lib/porkadot/configs/kubelet.rb', line 18

def addon_path
  File.join(self.target_path, 'addons')
end

#addon_secrets_pathObject



22
23
24
# File 'lib/porkadot/configs/kubelet.rb', line 22

def addon_secrets_path
  File.join(self.target_secrets_path, 'addons')
end

#ca_crt_pathObject



26
27
28
# File 'lib/porkadot/configs/kubelet.rb', line 26

def ca_crt_path
  File.join(self.target_path, 'ca.crt')
end

#control_plane_endpointObject



30
31
32
# File 'lib/porkadot/configs/kubelet.rb', line 30

def control_plane_endpoint
  (self.raw.kubernetes && self.raw.kubernetes.control_plane_endpoint) || self.config.k8s.control_plane_endpoint
end

#target_pathObject



10
11
12
# File 'lib/porkadot/configs/kubelet.rb', line 10

def target_path
  File.join(self.config.assets_dir, 'kubelet-default')
end

#target_secrets_pathObject



14
15
16
# File 'lib/porkadot/configs/kubelet.rb', line 14

def target_secrets_path
  File.join(self.config.secrets_root_dir, 'kubelet-default')
end