Skip to content

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Sep 11, 2025

No description provided.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 11, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 11, 2025
@k8s-ci-robot
Copy link
Contributor

@medyagh: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-minikube-build 3a2ed1d link true /test pull-minikube-build
pull-minikube-integration 3a2ed1d link true /test pull-minikube-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@nirs nirs left a comment

Choose a reason for hiding this comment

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

This seems to do 2 changes:

  • use ed25519 instead of rsa - looks good, matching the default algorithm in Fedora and macOS
  • Keep the key in /root/.ssh instead of /docker.ssh - seems untreated to this change.

It is nice to keep the key in a common user that will never change instead of docker user that seems to be the wrong name for minikube vm user, but not clear why this is mixed with the algorithm change. Mixing unrelated changes make it harder to review and manage, for example reverting the user change if it turns out problematic.

@@ -51,7 +51,7 @@ const (
nineP = "9p"
defaultMount9PVersion = "9p2000.L"
mount9PVersionDescription = "Specify the 9p version that the mount should use"
defaultMountGID = "docker"
defaultMountGID = "root"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we change mount command user? how is this related to changing ssh key algorithm?

@@ -210,6 +210,6 @@ func validateArgs(src, dst *remotePath) {
// if node name not explicitly specified in both of source and target,
// consider target node is control-plane for backward compatibility.
if src.node == "" && dst.node == "" && !strings.HasPrefix(dst.path, "/") {
exit.Message(reason.Usage, `Target <remote file path> must be an absolute Path. Relative Path is not allowed (example: "minikube:/home/docker/copied.txt")`)
exit.Message(reason.Usage, `Target <remote file path> must be an absolute Path. Relative Path is not allowed (example: "minikube:/root/copied.txt")`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change the location of the file?

@@ -208,7 +208,7 @@ func startKicServiceTunnel(services service.URLs, configName, driverName string)
exit.Error(reason.DrvPortForward, "error getting ssh port", err)
}
sshPort := strconv.Itoa(port)
sshKey := filepath.Join(localpath.MiniPath(), "machines", configName, "id_rsa")
sshKey := filepath.Join(localpath.MiniPath(), "machines", configName, "id_ed25519")
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks fine, but why do we have to hard code the algorithm? why not use the default algorithm on the host? With this code we will have to change again when the default changes next time.

@@ -67,7 +67,7 @@ func appendKnownHelper(nodeName string, appendKnown bool) {
}
}

scanArgs := []string{"-t", "rsa"}
scanArgs := []string{"-t", "ed25519"}
Copy link
Contributor

Choose a reason for hiding this comment

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

We use this in too many places - add a constant so we can have the algorithm exactly once in the project.

@@ -262,6 +262,8 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER docker
RUN mkdir /home/docker/.ssh
USER root
# prepare root ssh directory for minikube access
RUN mkdir /root/.ssh
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it has to be in /root?

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants