class Ruboty::K8s::Config
Public Class Methods
client(cluster_name)
click to toggle source
# File lib/ruboty/k8s/config.rb, line 6 def client(cluster_name) config_yml[cluster_name]['client'] end
config_file_path()
click to toggle source
# File lib/ruboty/k8s/config.rb, line 28 def config_file_path @@config_file_path ||= ENV['RUBOTY_K8S_CONFIG_PATH'] end
config_yml()
click to toggle source
# File lib/ruboty/k8s/config.rb, line 18 def config_yml @@config_yml ||= begin YAML.load( ERB.new( open(config_file_path).read ).result ) end end
deployments(cluster_name)
click to toggle source
# File lib/ruboty/k8s/config.rb, line 10 def deployments(cluster_name) config_yml[cluster_name]['deployments'] end
has_cluster?(cluster_name)
click to toggle source
# File lib/ruboty/k8s/config.rb, line 14 def has_cluster?(cluster_name) config_yml.keys.include?(cluster_name) end
set_config_file_path(file_path)
click to toggle source
# File lib/ruboty/k8s/config.rb, line 32 def set_config_file_path(file_path) @@config_file_path = file_path end