Class: Kuby::EKS::Provider
- Inherits:
-
Kubernetes::Provider
- Object
- Kubernetes::Provider
- Kuby::EKS::Provider
- Defined in:
- lib/kuby/eks/provider.rb
Constant Summary collapse
- STORAGE_CLASS_NAME =
'gp2'.freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #before_deploy ⇒ Object
- #before_setup ⇒ Object
- #configure(&block) ⇒ Object
- #kubeconfig_path ⇒ Object
- #kubernetes_cli ⇒ Object
- #storage_class_name ⇒ Object
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'lib/kuby/eks/provider.rb', line 13 def config @config end |
Instance Method Details
#before_deploy ⇒ Object
34 35 36 |
# File 'lib/kuby/eks/provider.rb', line 34 def before_deploy(*) refresh_kubeconfig end |
#before_setup ⇒ Object
30 31 32 |
# File 'lib/kuby/eks/provider.rb', line 30 def before_setup refresh_kubeconfig end |
#configure(&block) ⇒ Object
15 16 17 |
# File 'lib/kuby/eks/provider.rb', line 15 def configure(&block) config.instance_eval(&block) end |
#kubeconfig_path ⇒ Object
19 20 21 22 23 24 |
# File 'lib/kuby/eks/provider.rb', line 19 def kubeconfig_path File.join( kubeconfig_dir, "#{environment.app_name.downcase}-#{config.hash_value}-kubeconfig.yaml" ) end |
#kubernetes_cli ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/kuby/eks/provider.rb', line 38 def kubernetes_cli @kubernetes_cli ||= ::KubernetesCLI.new(kubeconfig_path).tap do |cli| cli.before_execute do refresh_kubeconfig end end end |
#storage_class_name ⇒ Object
26 27 28 |
# File 'lib/kuby/eks/provider.rb', line 26 def storage_class_name STORAGE_CLASS_NAME end |