Class: Kuby::Kubernetes::MinikubeProvider
- Defined in:
- lib/kuby/kubernetes/minikube_provider.rb
Defined Under Namespace
Classes: Config
Constant Summary collapse
- STORAGE_CLASS_NAME =
'hostpath'.freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Attributes inherited from Provider
Instance Method Summary collapse
- #after_configuration ⇒ Object
- #configure(&block) ⇒ Object
- #kubeconfig_path ⇒ Object
- #storage_class_name ⇒ Object
Methods inherited from Provider
#after_deploy, #after_setup, #before_deploy, #before_setup, #deploy, #initialize, #kubernetes_cli, #rollback, #setup
Constructor Details
This class inherits a constructor from Kuby::Kubernetes::Provider
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
14 15 16 |
# File 'lib/kuby/kubernetes/minikube_provider.rb', line 14 def config @config end |
Instance Method Details
#after_configuration ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/kuby/kubernetes/minikube_provider.rb', line 20 def after_configuration if rails_app = spec.plugin(:rails_app) # Remove ingress and change service type from ClusterIP to # LoadBalancer. No need to set up ingress for minikube since # it handles all the localhost mapping, etc if you set up a # service LB. rails_app.resources.delete(rails_app.ingress) rails_app.service.spec { type 'LoadBalancer' } end configure do # default kubeconfig path kubeconfig File.join(ENV['HOME'], '.kube', 'config') end end |
#configure(&block) ⇒ Object
16 17 18 |
# File 'lib/kuby/kubernetes/minikube_provider.rb', line 16 def configure(&block) config.instance_eval(&block) if block end |
#kubeconfig_path ⇒ Object
36 37 38 |
# File 'lib/kuby/kubernetes/minikube_provider.rb', line 36 def kubeconfig_path config.kubeconfig end |
#storage_class_name ⇒ Object
40 41 42 |
# File 'lib/kuby/kubernetes/minikube_provider.rb', line 40 def storage_class_name STORAGE_CLASS_NAME end |