Class: Kuby::Kubernetes::BareMetalProvider

Inherits:
Provider
  • Object
show all
Defined in:
lib/kuby/kubernetes/bare_metal_provider.rb

Defined Under Namespace

Classes: Config

Constant Summary collapse

DEFAULT_STORAGE_CLASS =

extend T::Sig

'hostpath'.freeze

Instance Attribute Summary collapse

Attributes inherited from Provider

#environment

Instance Method Summary collapse

Methods inherited from Provider

#after_configuration, #after_deploy, #after_setup, #before_deploy, #before_setup, #deploy, #deployer, #helm_cli, #kubernetes_cli, #rollback, #setup

Constructor Details

#initialize(environment) ⇒ BareMetalProvider

T::Sig::WithoutRuntime.sig { params(environment: Environment).void }



23
24
25
26
# File 'lib/kuby/kubernetes/bare_metal_provider.rb', line 23

def initialize(environment)
  @config = Config.new
  super
end

Instance Attribute Details

#configObject (readonly)

T::Sig::WithoutRuntime.sig { returns(Config) }



20
21
22
# File 'lib/kuby/kubernetes/bare_metal_provider.rb', line 20

def config
  @config
end

Instance Method Details

#configure(&block) ⇒ Object

T::Sig::WithoutRuntime.sig { params(block: T.proc.void).void }



29
30
31
# File 'lib/kuby/kubernetes/bare_metal_provider.rb', line 29

def configure(&block)
  config.instance_eval(&block) if block
end

#kubeconfig_pathObject

T::Sig::WithoutRuntime.sig { returns(String) }



34
35
36
# File 'lib/kuby/kubernetes/bare_metal_provider.rb', line 34

def kubeconfig_path
  config.kubeconfig
end

#storage_class_nameObject

T::Sig::WithoutRuntime.sig { returns(String) }



39
40
41
# File 'lib/kuby/kubernetes/bare_metal_provider.rb', line 39

def storage_class_name
  config.storage_class
end