Class: Kuby::Kubernetes::DockerDesktopProvider
- Defined in:
- lib/kuby/kubernetes/docker_desktop_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, #deployer, #helm_cli, #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.
15 16 17 |
# File 'lib/kuby/kubernetes/docker_desktop_provider.rb', line 15 def config @config end |
Instance Method Details
#after_configuration ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/kuby/kubernetes/docker_desktop_provider.rb', line 21 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 Docker Desktop # 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 if assets = spec.plugin(:rails_assets) assets.service.spec { type 'LoadBalancer' } end end |
#configure(&block) ⇒ Object
17 18 19 |
# File 'lib/kuby/kubernetes/docker_desktop_provider.rb', line 17 def configure(&block) config.instance_eval(&block) if block end |
#kubeconfig_path ⇒ Object
36 37 38 |
# File 'lib/kuby/kubernetes/docker_desktop_provider.rb', line 36 def kubeconfig_path config.kubeconfig end |
#storage_class_name ⇒ Object
40 41 42 |
# File 'lib/kuby/kubernetes/docker_desktop_provider.rb', line 40 def storage_class_name STORAGE_CLASS_NAME end |