Class: Kuby::Kind::Provider

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

Constant Summary collapse

STORAGE_CLASS_NAME =
'standard'.freeze
DEFAULT_EXPOSED_PORTS =
[80, 443].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/kind/provider.rb', line 11

def config
  @config
end

Instance Method Details

#after_configurationObject



39
40
41
42
43
44
45
# File 'lib/kuby/kind/provider.rb', line 39

def after_configuration
  if nginx_ingress = environment.kubernetes.plugin(:nginx_ingress)
    nginx_ingress.configure do
      provider('kind') unless provider
    end
  end
end

#configure(&block) ⇒ Object



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

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

#deployObject



32
33
34
35
36
37
# File 'lib/kuby/kind/provider.rb', line 32

def deploy
  ensure_cluster!
  load_images

  super
end

#kubeconfig_pathObject



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

def kubeconfig_path
  File.join(
    kubeconfig_dir, "#{cluster_name}-kubeconfig.yaml"
  )
end

#setupObject



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

def setup
  @setting_up = true
  ensure_cluster!
end

#storage_class_nameObject



23
24
25
# File 'lib/kuby/kind/provider.rb', line 23

def storage_class_name
  STORAGE_CLASS_NAME
end