@@ -22,6 +22,10 @@ import (
22
22
)
23
23
24
24
// +kubebuilder:validation:Enum=instance;ip
25
+ // TargetType is the targetType of your ELBV2 TargetGroup.
26
+ //
27
+ // * with `instance` TargetType, nodes with nodePort for your service will be registered as targets
28
+ // * with `ip` TargetType, Pods with containerPort for your service will be registered as targets
25
29
type TargetType string
26
30
27
31
const (
@@ -65,6 +69,7 @@ type NetworkingPeer struct {
65
69
}
66
70
67
71
// +kubebuilder:validation:Enum=TCP;UDP
72
+ // NetworkingProtocol defines the protocol for networking rules.
68
73
type NetworkingProtocol string
69
74
70
75
const (
@@ -75,6 +80,7 @@ const (
75
80
NetworkingProtocolUDP NetworkingProtocol = "UDP"
76
81
)
77
82
83
+ // NetworkingPort defines the port and protocol for networking rules.
78
84
type NetworkingPort struct {
79
85
// The protocol which traffic must match.
80
86
// If protocol is unspecified, it defaults to TCP.
@@ -88,6 +94,7 @@ type NetworkingPort struct {
88
94
Port * intstr.IntOrString `json:"port,omitempty"`
89
95
}
90
96
97
+ // NetworkingIngressRule defines a particular set of traffic that is allowed to access TargetGroup's targets.
91
98
type NetworkingIngressRule struct {
92
99
// List of peers which should be able to access the targets in TargetGroup.
93
100
// At least one NetworkingPeer should be specified.
@@ -98,6 +105,7 @@ type NetworkingIngressRule struct {
98
105
Ports []NetworkingPort `json:"ports"`
99
106
}
100
107
108
+ // TargetGroupBindingNetworking defines the networking rules to allow ELBV2 LoadBalancer to access targets in TargetGroup.
101
109
type TargetGroupBindingNetworking struct {
102
110
// List of ingress rules to allow ELBV2 LoadBalancer to access targets in TargetGroup.
103
111
// +optional
@@ -116,7 +124,7 @@ type TargetGroupBindingSpec struct {
116
124
// serviceRef is a reference to a Kubernetes Service and ServicePort.
117
125
ServiceRef ServiceReference `json:"serviceRef"`
118
126
119
- // networking provides the networking setup for ELBV2 LoadBalancer to access targets in TargetGroup.
127
+ // networking defines the networking rules to allow ELBV2 LoadBalancer to access targets in TargetGroup.
120
128
// +optional
121
129
Networking * TargetGroupBindingNetworking `json:"networking,omitempty"`
122
130
}
0 commit comments