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

Support kubekey to independently generate certificates #944

Merged
merged 1 commit into from Dec 29, 2021

Conversation

pixiake
Copy link
Collaborator

@pixiake pixiake commented Dec 29, 2021

What does this PR do ?

  • Generate certificates logic using code refactoring.
  • This method can be used uniformly to generate certificates when installing other software requiring certificates by KubeKey.

Signed-off-by: pixiake guofeng@yunify.com

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pixiake

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

@ks-ci-bot ks-ci-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 29, 2021
func (f *FetchCerts) Execute(runtime connector.Runtime) error {
src := "/etc/ssl/etcd/ssl"
dst := fmt.Sprintf("%s/pki/etcd", runtime.GetWorkDir())
if v, ok := f.PipelineCache.Get(common.ETCDCluster); ok {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we handle !ok first will make code indentation more graceful. For example:

Suggested change
if v, ok := f.PipelineCache.Get(common.ETCDCluster); ok {
v, ok := f.PipelineCache.Get(common.ETCDCluster)
if !ok {
return errors.New("get etcd status from pipeline cache failed")
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,320 @@
/*
Copyright 2016 The Kubernetes Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the copyright need to be modified?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The code in this file is obtained from kubernetes. So the copyright needs to be consistent with kubernetes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So, is it normal for a project to have two different copyright?

Signed-off-by: pixiake <guofeng@yunify.com>
@24sama
Copy link
Collaborator

24sama commented Dec 29, 2021

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 29, 2021
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 7cb21d048923875d187c4b6d957014992d76ba05

@ks-ci-bot ks-ci-bot merged commit d037ee5 into kubesphere:master Dec 29, 2021
@24sama
Copy link
Collaborator

24sama commented Jan 10, 2022

/cherrypick release-2.0

@ks-ci-bot
Copy link
Collaborator

@24sama: new pull request created: #971

In response to this:

/cherrypick release-2.0

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants