8000 Use profile name as cluster/node name by laozc · Pull Request #6200 · kubernetes/minikube · GitHub
[go: up one dir, main page]

Skip to content

Use profile name as cluster/node name - #6200

#6200
Merged
sharifelgamal merged 12 commits into
kubernetes:masterfrom
laozc:node-name
Feb 5, 2020
Merged

sharifelgamal merged 12 commits into
kubernetes:masterfrom
laozc:node-name

Conversation

@laozc
@laozc laozc commented Jan 3, 2020
Copy link
Copy Markdown
Member

The node name is always minikube nowadays and this PR allows user to pick up one with --node-name.
If not specified, the node will be named minikube for the default profile name (minikube) or [PROFILE]-minikube.
For none driver the default node name will be set to the host name.

fixes #2800 #4063

laozc added 3 commits January 1, 2020 13:45
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
@minikube-bot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 3, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @laozc. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: laozc
To complete the pull request process, please assign priyawadhwa
You can assign the PR to them by writing /assign @priyawadhwa in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details 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

@codecov-io
codecov-io commented Jan 3, 2020 •
Copy link
Copy Markdown

Codecov Report

Merging #6200 into master will decrease coverage by 0.41%.
The diff coverage is 26.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6200      +/-   ##
==========================================
- Coverage   38.38%   37.97%   -0.42%     
==========================================
  Files         124      128       +4     
  Lines        8378     8722     +344     
==========================================
+ Hits         3216     3312      +96     
- Misses       4739     4983     +244     
- Partials      423      427       +4
Impacted Files Coverage Δ
cmd/minikube/cmd/mount.go 8.33% <ø> (ø) ⬆️
pkg/minikube/out/style.go 91.66% <ø> (ø) ⬆️
pkg/minikube/bootstrapper/bootstrapper.go 0% <ø> (ø) ⬆️
pkg/minikube/driver/driver.go 71.83% <ø> (+1.96%) ⬆️
pkg/minikube/command/exec_runner.go 0% <ø> (ø) ⬆️
pkg/minikube/bootstrapper/bsutil/files.go 0% <ø> (ø) ⬆️
cmd/minikube/cmd/config/profile_list.go 3.94% <0%> (-0.17%) ⬇️
cmd/minikube/cmd/kubectl.go 0% <0%> (ø) ⬆️
pkg/minikube/assets/addons.go 36.06% <0%> (-1.87%) ⬇️
cmd/minikube/cmd/service.go 17.94% <0%> (-0.48%) ⬇️
... and 43 more

@medyagh medyagh left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for this PR ! and this is a good idea !
two thigns
1- please use profile name as node name
2- please make sure the kubeadm config templates also receive the node name.

Comment thread cmd/minikube/cmd/start.go Resolved
Comment thread cmd/minikube/cmd/start.go Resolved
@RA489
RA489 commented Jan 8, 2020
Copy link
Copy Markdown

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 8, 2020
@minikube-bot
Copy link
Copy Markdown
Collaborator

All Times minikube: [ 124.025748 131.830177 125.899917]
All Times Minikube (PR 6200): [ 127.337378 129.701776 114.584535]

Average minikube: 127.251947
Average Minikube (PR 6200): 123.874563

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+-----------+--------------------+
| minikube v           |  0.499594 |           0.443831 |
| Creating kvm2        | 49.385835 |          46.897538 |
| Preparing Kubernetes | 51.015655 |          49.806792 |
| Pulling images       |  2.481664 |           2.718491 |
| Launching Kubernetes | 21.223641 |          21.188388 |
| Waiting for cluster  |  2.595839 |           2.770670 |
| Done                 |           |                    |
|                      |  0.049720 |           0.050935 |
+----------------------+-----------+--------------------+

Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
@minikube-bot
< 8000 span class="Button-content"> Copy link
Copy Markdown
Collaborator

All Times minikube: [ 123.943295 125.486914 125.486131]
All Times Minikube (PR 6200): [ 126.939861 125.606691 116.104350]

Average minikube: 124.972113
Average Minikube (PR 6200): 122.883634

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+-----------+--------------------+
| minikube v           |  0.467166 |           0.454020 |
| Creating kvm2        | 47.348030 |          47.525562 |
| Preparing Kubernetes | 51.080303 |          48.437225 |
| Pulling images       |  2.971338 |           3.120465 |
| Launching Kubernetes | 20.303665 |          20.545213 |
| Waiting for cluster  |  2.753121 |           2.751876 |
| Done                 |           |                    |
|                      |  0.048363 |           0.045304 |
+----------------------+-----------+--------------------+

@laozc laozc changed the title Allow user to specify node name Use profile name as node name Jan 8, 2020
@medyagh medyagh left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we also need to change the "clusterName: kubernetes" in the config template files
for example this one
https://github.com/kubernetes/minikube/blob/master/pkg/minikube/bootstrapper/bsutil/template/template.go#L80

make sure to change for all versions v1alpha, beta...

Comment thread cmd/minikube/cmd/start.go Outdated
}

var kubeNodeName string
if drvName == driver.None {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any reason that the none driver should not have the same node name as Profile name ?
I would rather we treat all drivers same way as much as possible.

so lets have the profile name for none driver unless there is a good reason for it that I dont know ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In the none driver the host is created by the user not minikube. If we're not setting the default host name, it will result a different node name with the host.
This issue would not exist for other drivers as those drivers create the VM and set the host name.
We may need to ask user to set the profile name to keep the same behavior as other drivers which may be confusing.

@medyagh medyagh changed the title Use profile name as node name Use profile name as cluster/node name Jan 8, 2020
@medyagh medyagh changed the title Use profile name as cluster/node name wip: Use profile name as cluster/node name Jan 8, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 8, 2020
@laozc
laozc commented Jan 9, 2020
Copy link
Copy Markdown
Member Author

we also need to change the "clusterName: kubernetes" in the config template files
for example this one
https://github.com/kubernetes/minikube/blob/master/pkg/minikube/bootstrapper/bsutil/template/template.go#L80

make sure to change for all versions v1alpha, beta...

Let me work on it.

laozc added 2 commits January 9, 2020 19:52
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
@minikube-bot
Copy link
Copy Markdown
Collaborator

All Times minikube: [ 122.312750 126.452668 128.741744]
All Times Minikube (PR 6200): [ 128.445923 125.514681 127.103730]

Average Minikube (PR 6200): 127.021444
Average minikube: 125.835720

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+-----------+--------------------+
| minikube v           |  0.517005 |           0.517984 |
| Creating kvm2        | 47.714099 |          47.615632 |
| Preparing Kubernetes | 50.474336 |          51.585890 |
| Pulling images       |  3.125711 |           3.069604 |
| Launching Kubernetes | 21.145112 |          21.102278 |
| Waiting for cluster  |  2.809713 |           3.080203 |
| Done                 |           |                    |
|                      |  0.049744 |           0.047879 |
+----------------------+-----------+--------------------+

@minikube-pr-bot
Copy link
Copy Markdown

All Times minikube: [ 230.471049 231.896780 255.411575]
All Times Minikube (PR 6200): [ 133.603658 131.999431 129.485016]

Average minikube: 239.259802
Average Minikube (PR 6200): 131.696035

Averages Time Per Log

+----------------------+------------+--------------------+
|         LOG          |  MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+------------+--------------------+
| minikube v           |   0.330490 |           0.490987 |
| Creating kvm2        | 165.055304 |          49.438031 |
| Preparing Kubernetes |  42.719826 |          52.327345 |
| Pulling images       |   3.093997 |           2.861671 |
| Launching Kubernetes |  25.124011 |          21.960791 |
| Waiting for cluster  |   2.408452 |           2.589912 |
+----------------------+------------+--------------------+

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 17, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 18, 2020
@minikube-pr-bot
Copy link
Copy Markdown

All Times minikube: [ 115.674457 114.736020 113.975103]
All Times Minikube (PR 6200): [ 246.228137 244.239141 223.489306]

Average minikube: 114.795194
Average Minikube (PR 6200): 237.985528

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+-----------+--------------------+
| minikube v           |  0.293279 |           0.295391 |
| Creating kvm2        | 41.204637 |         160.882943 |
| Preparing Kubernetes | 47.127649 |          41.354905 |
| Pulling images       |  3.579486 |           2.528940 |
| Launching Kubernetes | 19.648309 |          30.318637 |
| Waiting for cluster  |  2.888949 |           2.554120 |
+----------------------+-----------+--------------------+

@medyagh
medyagh commented Feb 2, 2020
Copy link
Copy Markdown
Member

/retest-this-please

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2020
@laozc laozc changed the title wip: Use profile name as cluster/node name Use profile name as cluster/node name Feb 3, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 3, 2020
Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
@minikube-pr-bot
Copy link
Copy Markdown

All Times minikube: [ 96.419035 97.156901 95.234201]
All Times Minikube (PR 6200): [ 248.164132 249.146323 230.991058]

Average minikube: 96.270046
Average Minikube (PR 6200): 242.767171

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+-----------+--------------------+
| minikube v           |  0.312811 |           0.289210 |
| Creating kvm2        | 19.591671 |         160.905856 |
| Preparing Kubernetes | 49.344328 |          42.566592 |
| Pulling images       |  3.671491 |           2.145264 |
| Launching Kubernetes | 20.317207 |          32.102551 |
| Waiting for cluster  |  1.065767 |           2.725942 |
+----------------------+-----------+--------------------+

@minikube-pr-bot
Copy link
Copy Markdown

All Times minikube: [ 95.112039 96.441117 99.449515]
All Times Minikube (PR 6200): [ 95.511743 100.262568 97.791517]

Average Minikube (PR 6200): 97.855276
Average minikube: 97.000891

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 6200) |
+----------------------+-----------+--------------------+
| minikube v           |  0.318202 |           0.314049 |
| Creating kvm2        | 20.270194 |          20.131254 |
| Preparing Kubernetes | 49.847239 |          50.782450 |
| Pulling images       |  3.196627 |           2.979757 |
| Launching Kubernetes | 19.858326 |          20.594995 |
| Waiting for cluster  |  1.387860 |           1.060559 |
+----------------------+-----------+--------------------+

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.97%. Comparing base (8679063) to head (fc85dd6).
⚠️ Report is 19960 commits behind head on master.

Files with missing lines Patch % Lines
cmd/minikube/cmd/start.go 60.00% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6200      +/-   ##
==========================================
+ Coverage   37.93%   37.97%   +0.03%     
==========================================
  Files         128      128              
  Lines        8714     8722       +8     
==========================================
+ Hits         3306     3312       +6     
- Misses       4982     4983       +1     
- Partials      426      427       +1     
Files with missing lines Coverage Δ
pkg/minikube/bootstrapper/bsutil/kubeadm.go 81.53% <100.00%> (+0.58%) ⬆️
pkg/minikube/bootstrapper/bsutil/kubelet.go 54.16% <100.00%> (+1.99%) ⬆️
pkg/minikube/bootstrapper/bsutil/versions.go 81.81% <ø> (ø)
cmd/minikube/cmd/start.go 22.51% <60.00%> (+0.15%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

running minikube with --bootstrapper=kubeadm uses minikube as the hard-coded node name

9 participants

0