Class: VagrantK8s::HelmConfig
- Inherits:
-
Object
- Object
- VagrantK8s::HelmConfig
- Defined in:
- lib/vagrant-k8s/helm_provisioner.rb
Instance Attribute Summary collapse
-
#atomic ⇒ Object
Returns the value of attribute atomic.
-
#chart ⇒ Object
Returns the value of attribute chart.
-
#create_namespace ⇒ Object
Returns the value of attribute create_namespace.
-
#helm ⇒ Object
Returns the value of attribute helm.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#release ⇒ Object
Returns the value of attribute release.
-
#repo ⇒ Object
Returns the value of attribute repo.
-
#set ⇒ Object
Returns the value of attribute set.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#values ⇒ Object
Returns the value of attribute values.
-
#version ⇒ Object
Returns the value of attribute version.
-
#wait ⇒ Object
Returns the value of attribute wait.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ HelmConfig
constructor
A new instance of HelmConfig.
- #validate(_machine) ⇒ Object
Constructor Details
#initialize ⇒ HelmConfig
Returns a new instance of HelmConfig.
11 12 13 14 15 16 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 11 def initialize @release = @chart = UNSET_VALUE @repo = @version = @namespace = UNSET_VALUE @values = @set = UNSET_VALUE @wait = @atomic = @create_namespace = @timeout = @helm = UNSET_VALUE end |
Instance Attribute Details
#atomic ⇒ Object
Returns the value of attribute atomic.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def atomic @atomic end |
#chart ⇒ Object
Returns the value of attribute chart.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def chart @chart end |
#create_namespace ⇒ Object
Returns the value of attribute create_namespace.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def create_namespace @create_namespace end |
#helm ⇒ Object
Returns the value of attribute helm.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def helm @helm end |
#namespace ⇒ Object
Returns the value of attribute namespace.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def namespace @namespace end |
#release ⇒ Object
Returns the value of attribute release.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def release @release end |
#repo ⇒ Object
Returns the value of attribute repo.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def repo @repo end |
#set ⇒ Object
Returns the value of attribute set.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def set @set end |
#timeout ⇒ Object
Returns the value of attribute timeout.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def timeout @timeout end |
#values ⇒ Object
Returns the value of attribute values.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def values @values end |
#version ⇒ Object
Returns the value of attribute version.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def version @version end |
#wait ⇒ Object
Returns the value of attribute wait.
8 9 10 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 8 def wait @wait end |
Instance Method Details
#finalize! ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 18 def finalize! @repo = nil if @repo == UNSET_VALUE @version = nil if @version == UNSET_VALUE @namespace = nil if @namespace == UNSET_VALUE @values = [] if @values == UNSET_VALUE @set = {} if @set == UNSET_VALUE @wait = false if @wait == UNSET_VALUE @atomic = false if @atomic == UNSET_VALUE @create_namespace = false if @create_namespace == UNSET_VALUE @timeout = nil if @timeout == UNSET_VALUE @helm = 'helm' if @helm == UNSET_VALUE end |
#validate(_machine) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/vagrant-k8s/helm_provisioner.rb', line 31 def validate(_machine) errors = [] errors << 'helm.release is required' unless @release.is_a?(String) && !@release.empty? errors << 'helm.chart is required' unless @chart.is_a?(String) && !@chart.empty? errors << 'helm.values must be an array' unless @values.is_a?(Array) errors << 'helm.set must be a hash' unless @set.is_a?(Hash) { 'vagrant-k8s' => errors } end |