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.



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

def config
  @config
end

Instance Method Details

#after_configurationObject



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

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



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

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

#deployObject



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

def deploy
  ensure_cluster!
  load_images

  super
end

#kubeconfig_pathObject



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

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

#setupObject



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

def setup
  @setting_up = true
  ensure_cluster!
end

#storage_class_nameObject



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

def storage_class_name
  STORAGE_CLASS_NAME
end