Class: Kbt::Deployment
- Inherits:
-
Object
- Object
- Kbt::Deployment
- Defined in:
- lib/kbt/deployment.rb
Instance Attribute Summary collapse
-
#containers ⇒ Object
readonly
Returns the value of attribute containers.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#replicas ⇒ Object
readonly
Returns the value of attribute replicas.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Deployment
constructor
A new instance of Deployment.
- #to_h ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Deployment
Returns a new instance of Deployment.
4 5 6 7 8 9 10 |
# File 'lib/kbt/deployment.rb', line 4 def initialize(args = {}) @template = args.fetch(:template) @name = args.fetch(:name) @labels = args.fetch(:labels) @containers = args.fetch(:containers) @replicas = args[:replicas] || 1 end |
Instance Attribute Details
#containers ⇒ Object (readonly)
Returns the value of attribute containers.
3 4 5 |
# File 'lib/kbt/deployment.rb', line 3 def containers @containers end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
3 4 5 |
# File 'lib/kbt/deployment.rb', line 3 def labels @labels end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/kbt/deployment.rb', line 3 def name @name end |
#replicas ⇒ Object (readonly)
Returns the value of attribute replicas.
3 4 5 |
# File 'lib/kbt/deployment.rb', line 3 def replicas @replicas end |
Instance Method Details
#to_h ⇒ Object
12 13 14 15 16 17 |
# File 'lib/kbt/deployment.rb', line 12 def to_h Fusu::Hash.deep_merge( template.value, overrides ) end |