Class: Kuby::EKS::Provider

Inherits:
Kubernetes::Provider
  • Object
show all
Defined in:
lib/kuby/eks/provider.rb

Constant Summary collapse

STORAGE_CLASS_NAME =
'gp2'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



12
13
14
# File 'lib/kuby/eks/provider.rb', line 12

def config
  @config
end

Instance Method Details

#before_deployObject



32
33
34
# File 'lib/kuby/eks/provider.rb', line 32

def before_deploy(*)
  refresh_kubeconfig
end

#before_setupObject



28
29
30
# File 'lib/kuby/eks/provider.rb', line 28

def before_setup
  refresh_kubeconfig
end

#configure(&block) ⇒ Object



14
15
16
# File 'lib/kuby/eks/provider.rb', line 14

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

#kubeconfig_pathObject



18
19
20
21
22
# File 'lib/kuby/eks/provider.rb', line 18

def kubeconfig_path
  @kubeconfig_path ||= File.join(
    kubeconfig_dir, "#{environment.app_name.downcase}-kubeconfig.yaml"
  )
end

#storage_class_nameObject



24
25
26
# File 'lib/kuby/eks/provider.rb', line 24

def storage_class_name
  STORAGE_CLASS_NAME
end