-
Notifications
You must be signed in to change notification settings - Fork 917
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
feat: karmadactl add ca-cert-path and ca-key-path opts #5127
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5127 +/- ##
==========================================
+ Coverage 28.21% 28.27% +0.05%
==========================================
Files 632 632
Lines 43568 43608 +40
==========================================
+ Hits 12294 12329 +35
+ Misses 30378 30377 -1
- Partials 896 902 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/assign @chaosi-zju @guozheng-shen You might need to rebase to get rid of the merge commits. #5127 (comment). |
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.
Hello, thank you for your important commit! Review is ongoing, and my viewpoint just for reference only.
The CI of this PR failed due to it wasn't signed off, usually please use Detail guideline can refer to: https://probot.github.io/apps/dco/ |
generally looks good, thanks for your contribution! By the way, have you tested? |
@@ -101,7 +101,7 @@ func TestGenCerts(_ *testing.T) { | |||
apiserverCertCfg := NewCertConfig("karmada-apiserver", []string{""}, karmadaAltNames, ¬After) | |||
frontProxyClientCertCfg := NewCertConfig("front-proxy-client", []string{}, certutil.AltNames{}, ¬After) | |||
|
|||
if err := GenCerts(TestCertsTmp, etcdServerCertConfig, etcdClientCertCfg, karmadaCertCfg, apiserverCertCfg, frontProxyClientCertCfg); err != nil { | |||
if err := GenCerts(TestCertsTmp, "", "", etcdServerCertConfig, etcdClientCertCfg, karmadaCertCfg, apiserverCertCfg, frontProxyClientCertCfg); err != nil { |
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.
It would be even better if you could supplement the test coverage for this case GenCerts(TestCertsTmp, caCertPath, caKeyPath, etcdServerCertConfig, etcdClientCertCfg, karmadaCertCfg, apiserverCertCfg, frontProxyClientCertCfg)
٩(๑❛ᴗ❛๑)۶ .
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.
ok
/lgtm |
Hello @guozheng-shen , I am a student participating in the karmada community open source activity. According to Tutor @liangyuanpeng suggestion, we think we can make some modifications to cert_test, adding the function of checking whether certificate files exist in the corresponding directory according to parameter passing to the end of the original unit test file. I am currently working on this aspect Would you like to ask what your opinion is on this modification, thank you for your trouble 您好,我是一名参加karmada社区开源活动的学生。根据导师@liangyuanpeng的建议,我们认为可以对cert_test进行一些修改,在原来的单元测试文件末尾添加根据参数传递来检查相应目录中是否存在证书文件的功能。我目前正在做这方面的工作,对此,我想请问您对这次修改有何意见,麻烦您了 |
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.
/assign
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.
Looks great! Thanks @guozheng-shen for doing this.
Just some nits, otherwise looks good to me.
pkg/karmadactl/cmdinit/cert/cert.go
Outdated
@@ -261,11 +262,12 @@ func NewCertConfig(cn string, org []string, altNames certutil.AltNames, notAfter | |||
} | |||
|
|||
// GenCerts Create CA certificate and sign etcd karmada certificate. | |||
func GenCerts(pkiPath string, etcdServerCertCfg, etcdClientCertCfg, karmadaCertCfg, apiserverCertCfg, frontProxyClientCertCfg *CertsConfig) error { | |||
caCert, caKey, err := NewCACertAndKey("karmada") | |||
func GenCerts(pkiPath, caCertPath, caKeyPath string, etcdServerCertCfg, etcdClientCertCfg, karmadaCertCfg, apiserverCertCfg, frontProxyClientCertCfg *CertsConfig) error { |
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.
Note: Too many parameters for this function.
Not required to fix it in this PR. But it is concerning.
Signed-off-by: guozheng-shen <[email protected]>
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
@guozheng-shen Have you tested this latest patch on your side? Does it work as expected?
@chaosi-zju @liangyuanpeng Do you have any further comments?
wating for the answer for test successed,otherwise LGTM |
looks good |
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.
OK thanks, let's do it.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
issue: #5103
Which issue(s) this PR fixes:
Fixes #5103
Special notes for your reviewer:
Does this PR introduce a user-facing change?: