Skip to content
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

Merged

Conversation

River-sh
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind enhancement
/kind feature
/sig network

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

@openyurt-bot
Copy link
Collaborator

@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.
For more information please see the contributor guide

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind enhancement
/kind feature
/sig network

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

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.

@openyurt-bot openyurt-bot added the size/XL size/XL: 500-999 label Aug 25, 2023
@River-sh River-sh force-pushed the dev_raven_internal_service_controller branch from 9faacef to 96f49e0 Compare August 25, 2023 08:06
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #1677 (149b4df) into master (68d4079) will decrease coverage by 0.34%.
The diff coverage is 35.51%.

@@            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     
Flag Coverage Δ
unittests 52.46% <35.51%> (-0.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...rvice/gateway_internal_service_enqueue_handlers.go 0.00% <0.00%> (ø)
...rnalservice/gateway_internal_service_controller.go 48.14% <48.14%> (ø)

Comment on lines 270 to 260
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
}
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@River-sh River-sh force-pushed the dev_raven_internal_service_controller branch from 96f49e0 to 2888291 Compare August 30, 2023 02:52
@River-sh River-sh force-pushed the dev_raven_internal_service_controller branch from 2888291 to 149b4df Compare August 30, 2023 03:01
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
6.2% 6.2% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link
Member

@YTGhost YTGhost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openyurt-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openyurt-bot openyurt-bot added the approved approved label Aug 31, 2023
@openyurt-bot openyurt-bot merged commit 8b94570 into openyurtio:master Aug 31, 2023
12 of 14 checks passed
luckymrwang added a commit to luckymrwang/openyurt that referenced this pull request Sep 20, 2023
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm size/XL size/XL: 500-999
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants