-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add gateway internal service controller #1677
add gateway internal service controller #1677
Conversation
@River-sh: GitHub didn't allow me to assign the following users: your_reviewer. Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. 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. |
9faacef
to
96f49e0
Compare
Codecov Report
@@ Coverage Diff @@
## master #1677 +/- ##
==========================================
- Coverage 52.79% 52.46% -0.34%
==========================================
Files 160 162 +2
Lines 18725 19091 +366
==========================================
+ Hits 9886 10016 +130
- Misses 7928 8150 +222
- Partials 911 925 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
func acquiredSpecPorts(gatewayList []*ravenv1beta1.Gateway, insecurePort, securePort int32) []corev1.ServicePort { | ||
specPorts := make([]corev1.ServicePort, 0) | ||
for _, gw := range gatewayList { | ||
for _, port := range splitPorts(gw.Spec.ProxyConfig.ProxyHTTPPort) { | ||
p, err := strconv.Atoi(port) | ||
if err != nil { | ||
continue | ||
} | ||
specPorts = append(specPorts, corev1.ServicePort{ | ||
Name: fmt.Sprintf("%s-%s", HTTPPorts, port), | ||
Protocol: corev1.ProtocolTCP, | ||
Port: int32(p), | ||
TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: insecurePort}, | ||
}) | ||
} | ||
for _, port := range splitPorts(gw.Spec.ProxyConfig.ProxyHTTPSPort) { | ||
p, err := strconv.Atoi(port) | ||
if err != nil { | ||
continue | ||
} | ||
specPorts = append(specPorts, corev1.ServicePort{ | ||
Name: fmt.Sprintf("%s-%s", HTTPSPorts, port), | ||
Protocol: corev1.ProtocolTCP, | ||
Port: int32(p), | ||
TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: securePort}, | ||
}) | ||
} | ||
} | ||
return specPorts | ||
} |
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.
Maybe it would be better to have a separate function for the same part
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.
done
96f49e0
to
2888291
Compare
2888291
to
149b4df
Compare
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rambohe-ch, River-sh 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 |
…fix_calico * 'master' of https://github.com/openyurtio/openyurt: Add status info to YurtAppSet/YurtAppDaemon (openyurtio#1702) fix: add the logic of removing the finalizer (openyurtio#1695) Fix work dir nested `yurthub/yurthub` (openyurtio#1693) Add yurtappoverrider (openyurtio#1684) modify the logic for judging static pods and combine the utils for pod and node (openyurtio#1689) chore: slice loop replace (openyurtio#1690) unified expression about DaemonSet (openyurtio#1698) improve controller names (openyurtio#1687) add gateway public service controller (openyurtio#1685) feat: add token format checking to yurtadm join process (openyurtio#1681) add gateway internal service controller (openyurtio#1677) fix: yurt-iot-dock cannot be dynamically deployed in platformadmin (openyurtio#1679) unserve v1alpha1 version of platformadmin crd (openyurtio#1659)
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
other Note