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 kcctl conection port configurable #207

Merged
merged 3 commits into from
Sep 13, 2022
Merged

add kcctl conection port configurable #207

merged 3 commits into from
Sep 13, 2022

Conversation

Metrora
Copy link
Contributor

@Metrora Metrora commented Sep 8, 2022

Signed-off-by: Liucw liu.chuwei@99cloud.net

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #191

Special notes for reviewers:

Does this PR introduced a user-facing change?

None

Additional documentation, usage docs, etc.:


@x893675

Signed-off-by: Liucw <liu.chuwei@99cloud.net>
@kubeclipper-bot kubeclipper-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note-none dco-signoff: yes size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 8, 2022
Signed-off-by: Liucw <liu.chuwei@99cloud.net>
@@ -65,6 +65,7 @@ const (
DefaultDeployConfig = "deploy-config.yaml"
DefaultConfig = "config"
DefaultCaPath = "pki"
DefaultSSHPort = 22
Copy link
Collaborator

Choose a reason for hiding this comment

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

unnessasery

@@ -268,6 +269,7 @@ func NewDeployOptions() *DeployConfig {
IPDetect: autodetection.MethodFirst,
SSHConfig: &sshutils.SSH{
User: "root",
Port: DefaultSSHPort,
Copy link
Collaborator

Choose a reason for hiding this comment

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

22

if c.Config == "" {
return nil
}

if c.SSHConfig.Port != DefaultSSHPort {
Copy link
Collaborator

Choose a reason for hiding this comment

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

unnessasery

@@ -308,9 +310,15 @@ func (c *DeployConfig) MergeDeployOptions() {
}

func (c *DeployConfig) Complete() error {
port := 0
Copy link
Collaborator

@x893675 x893675 Sep 10, 2022

Choose a reason for hiding this comment

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

unnessasery, just check port > 0 in func ValidateArgs

@@ -338,6 +346,12 @@ func (c *DeployConfig) Complete() error {
}
}

if port != 0 {
c.SSHConfig.Port = port
} else if c.SSHConfig.Port == 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

unnessasery

Signed-off-by: Liucw <liu.chuwei@99cloud.net>
@kubeclipper-bot kubeclipper-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 13, 2022
@x893675
Copy link
Collaborator

x893675 commented Sep 13, 2022

/cc @lixd

Copy link
Contributor

@lixd lixd left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubeclipper-bot kubeclipper-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 13, 2022
@kubeclipper-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 1b847426d669ac6e5cfddcd6c7dcb79b0cfd8261

@x893675
Copy link
Collaborator

x893675 commented Sep 13, 2022

/approve

@kubeclipper-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lixd, Metrora, x893675

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

@kubeclipper-bot kubeclipper-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 13, 2022
@kubeclipper-bot kubeclipper-bot merged commit 28e8e3a into kubeclipper:master Sep 13, 2022
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. dco-signoff: yes kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ssh connection port changed to configurable
4 participants