Class: Kuby::Kubernetes::Provider
- Inherits:
-
Object
- Object
- Kuby::Kubernetes::Provider
- Defined in:
- lib/kuby/kubernetes/provider.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Instance Method Summary collapse
-
#after_configuration ⇒ Object
called after all providers and plugins have been configured.
-
#after_deploy(manifest) ⇒ Object
called after the deploy has completed.
-
#after_setup ⇒ Object
called after all providers and plugins have been setup.
-
#before_deploy(manifest) ⇒ Object
called before the deploy is initiated.
-
#before_setup ⇒ Object
called before any providers or plugins have been setup.
- #configure(&block) ⇒ Object
- #deploy ⇒ Object
- #deployer ⇒ Object
- #helm_cli ⇒ Object
-
#initialize(environment) ⇒ Provider
constructor
A new instance of Provider.
- #kubeconfig_path ⇒ Object
- #kubernetes_cli ⇒ Object
- #rollback ⇒ Object
- #setup ⇒ Object
Constructor Details
#initialize(environment) ⇒ Provider
Returns a new instance of Provider.
9 10 11 12 |
# File 'lib/kuby/kubernetes/provider.rb', line 9 def initialize(environment) @environment = environment after_initialize end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
7 8 9 |
# File 'lib/kuby/kubernetes/provider.rb', line 7 def environment @environment end |
Instance Method Details
#after_configuration ⇒ Object
called after all providers and plugins have been configured
23 24 25 |
# File 'lib/kuby/kubernetes/provider.rb', line 23 def after_configuration # do nothing by default end |
#after_deploy(manifest) ⇒ Object
called after the deploy has completed
43 44 45 |
# File 'lib/kuby/kubernetes/provider.rb', line 43 def after_deploy(manifest) # do nothing by default end |
#after_setup ⇒ Object
called after all providers and plugins have been setup
33 34 35 |
# File 'lib/kuby/kubernetes/provider.rb', line 33 def after_setup # do nothing by default end |
#before_deploy(manifest) ⇒ Object
called before the deploy is initiated
38 39 40 |
# File 'lib/kuby/kubernetes/provider.rb', line 38 def before_deploy(manifest) # do nothing by default end |
#before_setup ⇒ Object
called before any providers or plugins have been setup
28 29 30 |
# File 'lib/kuby/kubernetes/provider.rb', line 28 def before_setup # do nothing by default end |
#configure(&block) ⇒ Object
14 15 16 |
# File 'lib/kuby/kubernetes/provider.rb', line 14 def configure(&block) # do nothing by default end |
#deploy ⇒ Object
47 48 49 |
# File 'lib/kuby/kubernetes/provider.rb', line 47 def deploy deployer.deploy end |
#deployer ⇒ Object
67 68 69 |
# File 'lib/kuby/kubernetes/provider.rb', line 67 def deployer @deployer ||= Kuby::Kubernetes::Deployer.new(environment) end |
#helm_cli ⇒ Object
59 60 61 |
# File 'lib/kuby/kubernetes/provider.rb', line 59 def helm_cli @helm_cli ||= ::HelmCLI.new(kubeconfig_path) end |
#kubeconfig_path ⇒ Object
63 64 65 |
# File 'lib/kuby/kubernetes/provider.rb', line 63 def kubeconfig_path raise NotImplementedError, "please define #{__method__} in #{self.class.name}" end |
#kubernetes_cli ⇒ Object
55 56 57 |
# File 'lib/kuby/kubernetes/provider.rb', line 55 def kubernetes_cli @kubernetes_cli ||= ::KubernetesCLI.new(kubeconfig_path) end |
#rollback ⇒ Object
51 52 53 |
# File 'lib/kuby/kubernetes/provider.rb', line 51 def rollback deployer.rollback end |
#setup ⇒ Object
18 19 20 |
# File 'lib/kuby/kubernetes/provider.rb', line 18 def setup # do nothing by default end |