-
Notifications
You must be signed in to change notification settings - Fork 91
Conversation
/lgtm |
/retest |
func getNodeIPs(ipFamily v1.IPFamily) []string { | ||
IPs := make([]string, 0) | ||
for _, ip := range *NodeAddresses { | ||
if ipFamily == v1.IPv4Protocol && netutils.IsIPv4String(ip) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait cant this just be if IPv4 or IPv6 then
IPs = append(...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func getExternalIPss(service *localv1.Service, ipFamily v1.IPFamily) ([]string, error) {
if service.IPs.ExternalIPs != nil {
if ipFamily == v1.IPv4Protocol {
return service.IPs.ExternalIPs.GetV4(), nil
} else if ipFamily == v1.IPv6Protocol {
return service.IPs.ExternalIPs.GetV6(), nil
}else{
return nil, errors.New(fmt.Sprint("ipfamily [%v] not supported", ipFamily))
}
} else {
return nil, errors.New("no ips found")
}
}
@jayunit100 something like this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait can't this just be IPv4 or IPv6 then
Entries in an IPSet can only belong to one IPFamily, so I loop service creation logic for both the ipFamilies.
// iterate over ipFamily
for _, ipFamily := range []v1.IPFamily{v1.IPv4Protocol, v1.IPv6Protocol} {
/ /iterate over NodeIPs
for _, nodeIP := range getNodeIPs(ipFamily) {
....
}
}
And then I pick the relevant IPSet accordingly
kubeNodePortTCPIPSet = map[v1.IPFamily]string{
v1.IPv4Protocol: "KUBE-NODE-PORT-TCP",
v1.IPv6Protocol: "KUBE-6-NODE-PORT-TCP",
}
/retest |
@daman1807: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/approve |
@jayunit100 all the tests (Security / govulncheck) pass now, we can merge this. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: daman1807, jayunit100 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In continuation to #417.
Passes e2e for ipv4, ipv6 and dual on Ubuntu 22.04.1 LTS.