Class: Kubes::Compiler::Dsl::Syntax::Service
- Inherits:
-
Resource
- Object
- Core::Base
- Resource
- Kubes::Compiler::Dsl::Syntax::Service
show all
- Defined in:
- lib/kubes/compiler/dsl/syntax/service.rb
Instance Attribute Summary
Attributes inherited from Resource
#kind_from_block
Instance Method Summary
collapse
Methods inherited from Resource
#default_kind, #default_metadata, #default_result, #default_result_append, #default_top, #field, #top
#extract_type, #normalize_kind
Instance Method Details
#default_apiVersion ⇒ Object
26
27
28
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 26
def default_apiVersion
"v1"
end
|
#default_port ⇒ Object
67
68
69
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 67
def default_port
80
end
|
#default_ports ⇒ Object
57
58
59
60
61
62
63
64
65
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 57
def default_ports
[
nodePort: nodePort, port: port, name: portName, protocol: protocol, targetPort: targetPort ]
end
|
#default_protocol ⇒ Object
71
72
73
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 71
def default_protocol
"TCP"
end
|
#default_selector ⇒ Object
30
31
32
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 30
def default_selector
labels
end
|
#default_spec ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 34
def default_spec
{
clusterIP: clusterIP,
externalIPs: externalIPs,
externalName: externalName,
externalTrafficPolicy: externalTrafficPolicy,
healthCheckNodePort: healthCheckNodePort,
ipFamily: ipFamily,
loadBalancerIP: loadBalancerIP,
loadBalancerSourceRanges: loadBalancerSourceRanges,
ports: ports,
publishNotReadyAddresses: publishNotReadyAddresses,
selector: selector,
sessionAffinity: sessionAffinity,
sessionAffinityConfig: sessionAffinityConfig,
type: type,
}
end
|
#default_targetPort ⇒ Object
75
76
77
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 75
def default_targetPort
80
end
|
#default_type ⇒ Object
53
54
55
|
# File 'lib/kubes/compiler/dsl/syntax/service.rb', line 53
def default_type
"ClusterIP"
end
|