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

【FIX】fix yurthub dnsPolicy when using pool-coordinator #1321

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

JameKeal
Copy link
Member

@JameKeal JameKeal commented Mar 21, 2023

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 bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind bug

What this PR does / why we need it:

YurtHub not set dnsPolicy, it use ClusterFirst in default, but it set hostNetwork=true, dnsPolicy turns into None, it`s means yurtHub only the resolution configured in dnsConfig is used, cluster and node resolution is not used.

It`s error when yurthub use pool-coordinator by services.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@rambohe-ch

Does this PR introduce a user-facing change?


other Note

@openyurt-bot
Copy link
Collaborator

@JameKeal: 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 bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind bug

What this PR does / why we need it:

YurtHub not set dnsPolicy, it use ClusterFirst in default, but it set hostNetwork=true, dnsPolicy turns into None, it`s means yurtHub only the resolution configured in dnsConfig is used, cluster and node resolution is not used.

It`s error when yurthub use pool-coordinator by services.

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 kind/bug kind/bug size/XS size/XS: 0-9 labels Mar 21, 2023
@github-advanced-security
Copy link

You have successfully added a new Trivy configuration .github/workflows/trivy-scan.yml:images/target:yurt-manager. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@github-advanced-security
Copy link

You have successfully added a new Trivy configuration .github/workflows/trivy-scan.yml:images/target:yurthub. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@github-advanced-security
Copy link

You have successfully added a new Trivy configuration .github/workflows/trivy-scan.yml:images/target:node-servant. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #1321 (d4bc60b) into master (056ba74) will decrease coverage by 0.32%.
The diff coverage is 24.61%.

❗ Current head d4bc60b differs from pull request most recent head 1314e29. Consider uploading reports for the commit 1314e29 to get more accurate results

@@            Coverage Diff             @@
##           master    #1321      +/-   ##
==========================================
- Coverage   53.28%   52.97%   -0.32%     
==========================================
  Files         102      103       +1     
  Lines       12776    12924     +148     
==========================================
+ Hits         6808     6846      +38     
- Misses       5413     5520     +107     
- Partials      555      558       +3     
Flag Coverage Δ
unittests 52.97% <24.61%> (-0.32%) ⬇️

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

Impacted Files Coverage Δ
...g/controller/csrapprover/csrapprover_controller.go 26.84% <0.00%> (-1.21%) ⬇️
pkg/yurthub/server/server.go 0.00% <0.00%> (ø)
pkg/yurthub/certificate/token/token.go 57.00% <14.58%> (-7.81%) ⬇️
...coordinator/cert/poolcoordinatorcert_controller.go 16.37% <17.50%> (ø)
...inator/delegatelease/poolcoordinator_controller.go 32.72% <33.33%> (-5.51%) ⬇️
pkg/yurtadm/util/error/error.go 40.47% <40.47%> (ø)
pkg/controller/poolcoordinator/cert/certificate.go 49.83% <57.14%> (ø)
pkg/controller/poolcoordinator/cert/util.go 84.84% <66.66%> (+42.42%) ⬆️
cmd/yurthub/app/config/config.go 53.25% <100.00%> (+0.17%) ⬆️
cmd/yurthub/app/options/options.go 94.67% <100.00%> (+0.06%) ⬆️
... and 2 more

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@Congrool Congrool left a comment

Choose a reason for hiding this comment

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

/lgtm

@Congrool
Copy link
Member

Congrool commented Mar 21, 2023

/hold

We should figure out why e2e tests failed. @JameKeal Could you please use command make local-up-openyurt at your local host to check if it can succeed?

@openyurt-bot openyurt-bot added the do-not-merge/hold do-not-merge/hold label Mar 21, 2023
@openyurt-bot openyurt-bot added size/M size/M: 30-99 and removed lgtm lgtm size/XS size/XS: 0-9 labels Mar 30, 2023
@openyurt-bot openyurt-bot added size/L size/L: 100-499 and removed size/M size/M: 30-99 labels Mar 31, 2023
cmd/yurthub/app/start.go Show resolved Hide resolved
cmd/yurthub/app/start.go Outdated Show resolved Hide resolved
cmd/yurthub/app/start.go Outdated Show resolved Hide resolved
cmd/yurthub/app/start.go Outdated Show resolved Hide resolved
pkg/controller/poolcoordinator/cert/util.go Show resolved Hide resolved
@openyurt-bot openyurt-bot added size/XXL and removed size/L size/L: 100-499 labels Apr 4, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@openyurt-bot openyurt-bot added the size/L size/L: 100-499 label Apr 4, 2023
@JameKeal JameKeal requested a review from Congrool April 4, 2023 11:39
@rambohe-ch
Copy link
Member

@Congrool PTAL

@Congrool
Copy link
Member

Congrool commented Apr 11, 2023

/unhold

Thanks for your contribution! It's ready for merge I think. @rambohe-ch

@openyurt-bot openyurt-bot removed the do-not-merge/hold do-not-merge/hold label Apr 11, 2023
@Congrool
Copy link
Member

/lgtm

@openyurt-bot openyurt-bot added the lgtm lgtm label Apr 11, 2023
@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JameKeal, rambohe-ch

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 Apr 11, 2023
@openyurt-bot openyurt-bot merged commit acb3346 into openyurtio:master Apr 11, 2023
@JameKeal JameKeal deleted the 20230321-pr branch April 12, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved kind/bug kind/bug lgtm lgtm size/L size/L: 100-499
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants