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 a PointToHost function for podman as well #8062

Merged
merged 2 commits into from
May 11, 2020

Conversation

afbjorklund
Copy link
Collaborator

And add an active variable, similiar to docker

Closes #6886

@afbjorklund afbjorklund requested a review from medyagh May 10, 2020 14:57
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 10, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

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 May 10, 2020
@medyagh
Copy link
Member

medyagh commented May 10, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 10, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

And add an active variable, similiar to docker
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

please also add it to fix.go, so we warn people that they need to reval their podman-env on minikube restart (because of IP change)

// maybeWarnAboutEvalEnv wil warn user if they need to re-eval their docker-env, podman-env
// because docker changes the allocated bind ports after restart https://github.com/kubernetes/minikube/issues/6824
func maybeWarnAboutEvalEnv(drver string, name string) {
	if !driver.IsKIC(drver) {
		return
	}
	p := os.Getenv(constants.MinikubeActiveDockerdEnv)
	if p == "" {
		return
	}
	out.T(out.Notice, "Noticed you have an activated docker-env on {{.driver_name}} driver in this terminal:", out.V{"driver_name": drver})
	// TODO: refactor docker-env package to generate only eval command per shell. https://github.com/kubernetes/minikube/issues/6887
	out.WarningT(`Please re-eval your docker-env, To ensure your environment variables have updated ports: 

	'minikube -p {{.profile_name}} docker-env'

	`, out.V{"profile_name": name})

}

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [63.75251888599999 64.683807988 63.690826474]
Average time for minikube: 64.04238444933334

Times for Minikube (PR 8062): [87.377967402 63.936263394 59.283693117]
Average time for Minikube (PR 8062): 70.199307971

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8062) |
+--------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on   |  0.065377 |           0.061509 |
| Debian 9.11                    |           |                    |
| * Using the kvm2 driver based  |  0.021961 |           0.021717 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.003422 |           0.003144 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 39.451042 |          38.537679 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.1 | 22.473871 |          29.045276 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  1.329015 |           1.627911 |
| components...                  |           |                    |
| * Enabled addons:              |  0.620336 |           0.814623 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.073797 |           0.082118 |
| configured to use "minikube"   |           |                    |
|                                |  0.003564 |           0.005331 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [29.161760439000002 26.694306188999995 26.198901824]
Average time for minikube: 27.351656150666667

Times for Minikube (PR 8062): [26.033633311000003 24.203768607999994 27.897081474]
Average time for Minikube (PR 8062): 26.044827797666667

Averages Time Per Log

+----------------------------------------+-----------+--------------------+
|                  LOG                   | MINIKUBE  | MINIKUBE (PR 8062) |
+----------------------------------------+-----------+--------------------+
| * minikube v1.10.0-beta.2 on           |  0.078202 |           0.075439 |
| Debian 9.11                            |           |                    |
| * Using the docker driver              |  0.002529 |           0.002438 |
| based on existing profile              |           |                    |
| * Starting control plane node          |  0.058888 |           0.058752 |
| minikube in cluster minikube           |           |                    |
| * Creating docker container            |  7.764689 |           7.463842 |
| (CPUs=2, Memory=3700MB) ...            |           |                    |
| * Preparing Kubernetes v1.18.1         |  0.120739 |           0.116425 |
| on Docker 19.03.2 ...                  |           |                    |
|   -                                    | 17.866649 |          17.245758 |
| kubeadm.pod-network-cidr=10.244.0.0/16 |           |                    |
| * Verifying Kubernetes                 |  1.389769 |           0.850859 |
| components...                          |           |                    |
| * Enabled addons:                      |  0.002565 |           0.163700 |
| default-storageclass,                  |           |                    |
| storage-provisioner                    |           |                    |
| * Done! kubectl is now                 |  0.063050 |           0.063078 |
| configured to use "minikube"           |           |                    |
|                                        |  0.004576 |           0.004536 |
+----------------------------------------+-----------+--------------------+

@medyagh medyagh merged commit 9c60548 into kubernetes:master May 11, 2020
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle podman-env in PointToHostDockerDaemon
4 participants