Class: Dapp::Deployment::Config::Directive::Expose
- Inherits:
-
Base
- Object
- Config::Directive::Base
- Base
- Dapp::Deployment::Config::Directive::Expose
- Defined in:
- lib/dapp/deployment/config/directive/expose.rb
Defined Under Namespace
Classes: Port
Instance Attribute Summary collapse
-
#_port ⇒ Object
readonly
Returns the value of attribute _port.
-
#_type ⇒ Object
readonly
Returns the value of attribute _type.
Instance Method Summary collapse
- #cluster_ip ⇒ Object
-
#initialize(dapp:) ⇒ Expose
constructor
A new instance of Expose.
- #load_balancer ⇒ Object
- #node_port ⇒ Object
- #port(number, &blk) ⇒ Object
Methods inherited from Base
Methods inherited from Config::Directive::Base
Constructor Details
#initialize(dapp:) ⇒ Expose
Returns a new instance of Expose.
9 10 11 12 13 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 9 def initialize(dapp:) @_port = [] @_type = 'ClusterIP' super end |
Instance Attribute Details
#_port ⇒ Object (readonly)
Returns the value of attribute _port.
6 7 8 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 6 def _port @_port end |
#_type ⇒ Object (readonly)
Returns the value of attribute _type.
7 8 9 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 7 def _type @_type end |
Instance Method Details
#cluster_ip ⇒ Object
15 16 17 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 15 def cluster_ip sub_directive_eval { @_type = 'ClusterIP' } end |
#load_balancer ⇒ Object
19 20 21 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 19 def load_balancer sub_directive_eval { @_type = 'LoadBalancer' } end |
#node_port ⇒ Object
23 24 25 |
# File 'lib/dapp/deployment/config/directive/expose.rb', line 23 def node_port sub_directive_eval { @_type = 'NodePort' } end |