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 config domain URL for cloudcore #2126

Merged
merged 2 commits into from
Sep 7, 2020

Conversation

ls889
Copy link
Member

@ls889 ls889 commented Sep 3, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1642

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@kubeedge-bot kubeedge-bot added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. kind/test This PR or issue is related to adding test(s) kind/design Categorizes issue or PR as related to design. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 3, 2020
@kevin-wangzefeng kevin-wangzefeng removed kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/design Categorizes issue or PR as related to design. kind/documentation Categorizes issue or PR as related to documentation. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/test This PR or issue is related to adding test(s) labels Sep 4, 2020
@kevin-wangzefeng
Copy link
Member

Removed irrelevant labels.

@@ -39,7 +39,8 @@ func SignCerts() ([]byte, []byte, error) {
Organization: []string{"KubeEdge"},
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
AltNames: certutil.AltNames{
IPs: getIps(hubconfig.Config.AdvertiseAddress),
DNSNames: hubconfig.Config.DNSNames,
Copy link
Member

Choose a reason for hiding this comment

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

nit: DNSNames => DomainNames ?

Copy link
Member Author

Choose a reason for hiding this comment

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

nit: DNSNames => DomainNames ?

@kevin-wangzefeng Thank for your suggestion. DNSNames is a bit weird, but in k8s, it is named like this, so we'd better keep using DNSNames.

@@ -63,6 +64,10 @@ func (cu *KubeCloudInstTool) InstallTools() error {
cloudCoreConfig.Modules.CloudHub.AdvertiseAddress = strings.Split(cu.AdvertiseAddress, ",")
}

if cu.DNSName != "" {
cloudCoreConfig.Modules.CloudHub.DNSNames = strings.Split(cu.DNSName, ",")
Copy link
Member

Choose a reason for hiding this comment

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

We need validations somewhere on the user input

Copy link
Member Author

Choose a reason for hiding this comment

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

@kevin-wangzefeng sure, I will be create a new pr to do it.

@kevin-wangzefeng
Copy link
Member

/milestone v1.5

@kevin-wangzefeng kevin-wangzefeng added this to the v1.5 milestone Sep 4, 2020
pkg/apis/componentconfig/cloudcore/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/componentconfig/cloudcore/v1alpha1/default.go Outdated Show resolved Hide resolved
@@ -28,6 +28,7 @@ type InitOptions struct {
KubeConfig string
Master string
AdvertiseAddress string
DNS string
Copy link
Member

Choose a reason for hiding this comment

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

Does the keadm command has the DNS flag option?

Copy link
Member Author

Choose a reason for hiding this comment

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

@fisherxu yes, in another pr.

Copy link
Member

Choose a reason for hiding this comment

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

We can add it to this one.

Copy link
Member Author

Choose a reason for hiding this comment

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

@fisherxu ok, i will merge them later.

@ls889 ls889 force-pushed the certDomain branch 3 times, most recently from ab98a5e to f8beffe Compare September 7, 2020 02:32
@@ -97,6 +97,9 @@ func addJoinOtherFlags(cmd *cobra.Command, initOpts *types.InitOptions) {

cmd.Flags().StringVar(&initOpts.AdvertiseAddress, types.AdvertiseAddress, initOpts.AdvertiseAddress,
"Use this key to set SANs in certificate of cloudcore. eg: 10.10.102.78,10.10.102.79")

cmd.Flags().StringVar(&initOpts.DNS, types.DomainName, initOpts.DNS,
"Use this key to set SANs in certificate of cloudcore. eg: www.cloudcore.cn,www.kubeedge.cn")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Use this key to set SANs in certificate of cloudcore. eg: www.cloudcore.cn,www.kubeedge.cn")
"Use this key to set domain names in cloudcore's certificate SubAltNames field. eg: www.cloudcore.cn,www.kubeedge.cn")

Also update the ip field above.

Copy link
Member Author

Choose a reason for hiding this comment

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

pkg/apis/componentconfig/cloudcore/v1alpha1/default.go Outdated Show resolved Hide resolved
@fisherxu
Copy link
Member

fisherxu commented Sep 7, 2020

/lgtm
/approve
Please raise another PR to fix the comment #2126 (comment)

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2020
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fisherxu

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

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 7, 2020
@kubeedge-bot kubeedge-bot merged commit 2eec550 into kubeedge:master Sep 7, 2020
@fisherxu fisherxu mentioned this pull request Sep 9, 2020
4 tasks
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add advertise address for cloudcore
5 participants