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.



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

def config
  @config
end

Instance Method Details

#configure(&block) ⇒ Object



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

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

#kubeconfig_pathObject



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

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

#kubernetes_cliObject



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

def kubernetes_cli
  @kubernetes_cli ||= begin
    refresh_kubeconfig
    super
  end
end

#storage_class_nameObject



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

def storage_class_name
  STORAGE_CLASS_NAME
end