-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added option to delete all profiles #4780
Merged
Merged
Changes from 30 commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
db6b0a5
Added --delete-all flag
mschwrz 08b6edc
Added function to get all profiles
mschwrz 6887128
Merge remote-tracking branch 'main/master' into DELETE_ALL_PROFILES
mschwrz 6f2390b
Added function to check if profile-config is valid
mschwrz 6c4749b
Bugfix: Imported wrong configname
mschwrz f9e8490
Removed debug code
mschwrz 13f40f4
Check if machineConfig and kubernetesConfig is not empty
mschwrz dd9afd1
Ensure usage of --delete-all without -p flag
mschwrz 1d2ead5
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 72a9493
Renamed delte-all flag to all
mschwrz 925e803
Added deleteProfile function
mschwrz 3c4b1b1
Renamed minikubeConfig to mkConfig
mschwrz f0e707c
Merge remote-tracking branch 'marekschwarz/DELETE_ALL_PROFILES' into …
mschwrz d0e749b
Implemented deleteAllProfiles
mschwrz 019ee1f
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 9e73f6e
Refactor review findings
mschwrz 09d8143
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 42a5850
Fixed lint errors
mschwrz af57143
Fixed translation errors
mschwrz 4c6af02
Fixed goimports lint error
mschwrz 70f4cb9
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 48bd69c
Integrated ListProfiles()
mschwrz e237a13
Fixed merge error
mschwrz 45161fa
Keep deleting when profiles when the deletion of one profile fails
mschwrz cb58974
Added testdata for unit tests
mschwrz 6d9ae13
Fixed Test
mschwrz 6dcb45a
Refactor
mschwrz 1ef11bf
Fix test
mschwrz 96ef740
Improved logging
mschwrz d4d8cc4
Refactor error init
mschwrz 6f81089
Fixed review findings
mschwrz a4fd885
Added valid configs for delete_test
mschwrz d7d05b7
Added more testdata
mschwrz 1d9a61f
Changed username
mschwrz 59eb974
Fixed testdata
mschwrz fa0cdbf
Fixed testdata
mschwrz 342584a
Fixed testdata
mschwrz a1d73a7
Added method to delete invalid profiles
mschwrz 50329ed
Added machine.go to Load and Validate machines
mschwrz 6ed4262
Resolved import cycle
mschwrz f0dd5a7
Added unit test for deletion of all profiles
mschwrz 229c9b7
Fixed lint errors
mschwrz 4835945
Bugfix
mschwrz d5bfa87
Added delete --all to proxy_test
mschwrz ba67c85
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz da1f935
Readded Shutdown and Teardown
mschwrz 5289e1f
Fixed lint errors
mschwrz b3741bd
Readded init
mschwrz 2c6f659
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 808477a
Moved GetMachinePath to machine.go and renamed it to MachinePath
mschwrz ea20ba3
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 0dc7f8d
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 24d4eda
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 5b1528b
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 71a6cb5
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 01dd044
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 79e8250
Use localpath
mschwrz 02bea60
Readded testdata
mschwrz 42c017f
Readded testdata
mschwrz 5cabb01
Removed certs
mschwrz d52730a
Fixed test errors
mschwrz 3ec82dd
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 47ec8d3
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz c8c4491
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz e8c997d
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 4551a17
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 3396f5b
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 1efdf11
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 280e118
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 8a4b3b9
Added more debug code
mschwrz ae6f47d
Appended "/.minikube" to testMinikubeDir for machine_test
mschwrz ee97b87
Added debug code
mschwrz b8abe56
Added more debug code
mschwrz 0c9cd49
Replaced driver "hyperkit" by "virtualbox" in testfiles
mschwrz 5610849
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz c4107ae
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz a0c844e
Refactor
mschwrz ae731d4
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz 09ce93f
Added delete --all to common.sh
mschwrz d13f58f
Merge branch 'master' into DELETE_ALL_PROFILES
mschwrz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"MachineConfig": { | ||
"KeepContext": false, | ||
"MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", | ||
"Memory": 2000, | ||
"CPUs": 2, | ||
"DiskSize": 20000, | ||
"VMDriver": "hyperkit", | ||
"ContainerRuntime": "docker", | ||
"HyperkitVpnKitSock": "", | ||
"HyperkitVSockPorts": [], | ||
"XhyveDiskDriver": "ahci-hd", | ||
"DockerEnv": null, | ||
"InsecureRegistry": null, | ||
"RegistryMirror": null, | ||
"HostOnlyCIDR": "192.168.99.1/24", | ||
"HypervVirtualSwitch": "", | ||
"KVMNetwork": "default", | ||
"KVMQemuURI": "qemu:///system", | ||
"KVMGPU": false, | ||
"KVMHidden": false, | ||
"DockerOpt": null, | ||
"DisableDriverMounts": false, | ||
"NFSShare": [], | ||
"NFSSharesRoot": "/nfsshares", | ||
"UUID": "", | ||
"NoVTXCheck": false, | ||
"DNSProxy": false, | ||
"HostDNSResolver": true | ||
}, | ||
"KubernetesConfig": { | ||
"KubernetesVersion": "v1.15.0", | ||
"NodeIP": "192.168.64.75", | ||
"NodePort": 8443, | ||
"NodeName": "minikube", | ||
"APIServerName": "minikubeCA", | ||
"APIServerNames": null, | ||
"APIServerIPs": null, | ||
"DNSDomain": "cluster.local", | ||
"ContainerRuntime": "docker", | ||
"CRISocket": "", | ||
"NetworkPlugin": "", | ||
"FeatureGates": "", | ||
"ServiceCIDR": "10.96.0.0/12", | ||
"ImageRepository": "", | ||
"ExtraOptions": null, | ||
"ShouldLoadCachedImages": true, | ||
"EnableDefaultCNI": false | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
pkg/minikube/config/testdata/profile/.minikube/profiles/p2/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"MachineConfig": { | ||
"KeepContext": false, | ||
"MinikubeISO": "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso", | ||
"Memory": 2000, | ||
"CPUs": 2, | ||
"DiskSize": 20000, | ||
"VMDriver": "virtualbox", | ||
"ContainerRuntime": "docker", | ||
"HyperkitVpnKitSock": "", | ||
"HyperkitVSockPorts": [], | ||
"DockerEnv": null, | ||
"InsecureRegistry": null, | ||
"RegistryMirror": null, | ||
"HostOnlyCIDR": "192.168.99.1/24", | ||
"HypervVirtualSwitch": "", | ||
"KVMNetwork": "default", | ||
"KVMQemuURI": "qemu:///system", | ||
"KVMGPU": false, | ||
"KVMHidden": false, | ||
"DockerOpt": null, | ||
"DisableDriverMounts": false, | ||
"NFSShare": [], | ||
"NFSSharesRoot": "/nfsshares", | ||
"UUID": "", | ||
"NoVTXCheck": false, | ||
"DNSProxy": false, | ||
"HostDNSResolver": true | ||
}, | ||
"KubernetesConfig": { | ||
"KubernetesVersion": "v1.15.0", | ||
"NodeIP": "192.168.99.136", | ||
"NodePort": 8443, | ||
"NodeName": "minikube", | ||
"APIServerName": "minikubeCA", | ||
"APIServerNames": null, | ||
"APIServerIPs": null, | ||
"DNSDomain": "cluster.local", | ||
"ContainerRuntime": "docker", | ||
"CRISocket": "", | ||
"NetworkPlugin": "", | ||
"FeatureGates": "", | ||
"ServiceCIDR": "10.96.0.0/12", | ||
"ImageRepository": "", | ||
"ExtraOptions": null, | ||
"ShouldLoadCachedImages": true, | ||
"EnableDefaultCNI": false | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
pkg/minikube/config/testdata/profile/.minikube/profiles/p4_invalid_file/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invalid json file :) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason to set the profile ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to set it because cluster.DeleteHost relies on cfg.GetMachineName(), which uses viper.GetString(MachineProfile).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't set it, the fallback machinename "minikube" is used.