Class: Kuby::Azure::Provider

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

Constant Summary collapse

STORAGE_CLASS_NAME =
'default'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



10
11
12
# File 'lib/kuby/azure/provider.rb', line 10

def config
  @config
end

Instance Method Details

#before_deployObject



30
31
32
# File 'lib/kuby/azure/provider.rb', line 30

def before_deploy(*)
  refresh_kubeconfig
end

#before_setupObject



26
27
28
# File 'lib/kuby/azure/provider.rb', line 26

def before_setup
  refresh_kubeconfig
end

#configure(&block) ⇒ Object



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

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

#kubeconfig_pathObject



16
17
18
19
20
# File 'lib/kuby/azure/provider.rb', line 16

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

#storage_class_nameObject



22
23
24
# File 'lib/kuby/azure/provider.rb', line 22

def storage_class_name
  STORAGE_CLASS_NAME
end