From df9b2c854126a4358d9b5bf6f6f796c424cfb8b6 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Mon, 18 Apr 2022 16:52:31 -0700 Subject: [PATCH 01/22] add JSON output to delete --- cmd/minikube/cmd/delete.go | 15 +++++++++------ pkg/minikube/out/register/register.go | 8 ++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index 23f407f74b..b2f8ec568c 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -110,6 +110,7 @@ var hostAndDirsDeleter = func(api libmachine.API, cc *config.ClusterConfig, prof func init() { deleteCmd.Flags().BoolVar(&deleteAll, "all", false, "Set flag to delete all profiles") deleteCmd.Flags().BoolVar(&purge, "purge", false, "Set this flag to delete the '.minikube' folder from your user directory.") + deleteCmd.Flags().StringVarP(&outputFormat, "output", "o", "text", "Format to print stdout in. Options include: [text,json]") if err := viper.BindPFlags(deleteCmd.Flags()); err != nil { exit.Error(reason.InternalBindFlags, "unable to bind flags", err) @@ -206,7 +207,8 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.Message(reason.Usage, "Usage: minikube delete") } - // register.SetEventLogPath(localpath.EventLog(ClusterFlagValue())) + register.SetEventLogPath(localpath.EventLog(ClusterFlagValue())) + out.SetJSON(outputFormat == "json") register.Reg.SetStep(register.Deleting) download.CleanUpOlderPreloads() validProfiles, invalidProfiles, err := config.ListProfiles() @@ -287,6 +289,7 @@ func purgeMinikubeDirectory() { if err := os.RemoveAll(localpath.MiniPath()); err != nil { exit.Error(reason.HostPurge, "unable to delete minikube config folder", err) } + register.Reg.SetStep(register.Purging) out.Step(style.Deleted, "Successfully purged minikube directory located at - [{{.minikubeDirectory}}]", out.V{"minikubeDirectory": localpath.MiniPath()}) } @@ -332,7 +335,7 @@ func deleteProfile(ctx context.Context, profile *config.Profile) error { if err := unpauseIfNeeded(profile); err != nil { klog.Warningf("failed to unpause %s : %v", profile.Name, err) } - out.Step(style.DeletingHost, `Deleting "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": profile.Name, "driver_name": profile.Config.Driver}) + out.Styled(style.DeletingHost, `Deleting "{{.profile_name}}" in {{.driver_name}} ...`, out.V{"profile_name": profile.Name, "driver_name": profile.Config.Driver}) for _, n := range profile.Config.Nodes { machineName := config.MachineName(*profile.Config, n) delete.PossibleLeftOvers(ctx, machineName, profile.Config.Driver) @@ -371,7 +374,7 @@ func deleteProfile(ctx context.Context, profile *config.Profile) error { return err } - out.Step(style.Deleted, `Removed all traces of the "{{.name}}" cluster.`, out.V{"name": profile.Name}) + out.Styled(style.Deleted, `Removed all traces of the "{{.name}}" cluster.`, out.V{"name": profile.Name}) return nil } @@ -461,7 +464,7 @@ func deleteContext(machineName string) error { } func deleteInvalidProfile(profile *config.Profile) []error { - out.Step(style.DeletingHost, "Trying to delete invalid profile {{.profile}}", out.V{"profile": profile.Name}) + out.Styled(style.DeletingHost, "Trying to delete invalid profile {{.profile}}", out.V{"profile": profile.Name}) var errs []error pathToProfile := config.ProfileFolderPath(profile.Name, localpath.MiniPath()) @@ -487,7 +490,7 @@ func profileDeletionErr(cname string, additionalInfo string) error { } func uninstallKubernetes(api libmachine.API, cc config.ClusterConfig, n config.Node, bsName string) error { - out.Step(style.Resetting, "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...", out.V{"kubernetes_version": cc.KubernetesConfig.KubernetesVersion, "bootstrapper_name": bsName}) + out.Styled(style.Resetting, "Uninstalling Kubernetes {{.kubernetes_version}} using {{.bootstrapper_name}} ...", out.V{"kubernetes_version": cc.KubernetesConfig.KubernetesVersion, "bootstrapper_name": bsName}) host, err := machine.LoadHost(api, config.MachineName(cc, n)) if err != nil { return DeletionError{Err: fmt.Errorf("unable to load host: %v", err), Errtype: MissingCluster} @@ -565,7 +568,7 @@ func handleMultipleDeletionErrors(errors []error) { func deleteProfileDirectory(profile string) { machineDir := filepath.Join(localpath.MiniPath(), "machines", profile) if _, err := os.Stat(machineDir); err == nil { - out.Step(style.DeletingHost, `Removing {{.directory}} ...`, out.V{"directory": machineDir}) + out.Styled(style.DeletingHost, `Removing {{.directory}} ...`, out.V{"directory": machineDir}) err := os.RemoveAll(machineDir) if err != nil { exit.Error(reason.GuestProfileDeletion, "Unable to remove machine directory", err) diff --git a/pkg/minikube/out/register/register.go b/pkg/minikube/out/register/register.go index db0e048391..96b231d752 100644 --- a/pkg/minikube/out/register/register.go +++ b/pkg/minikube/out/register/register.go @@ -26,6 +26,7 @@ import ( // If you add a new step here, please also add it to register.Reg registry inside the init() function const ( + // InitialSetup InitialSetup RegStep = "Initial Minikube Setup" SelectingDriver RegStep = "Selecting Driver" DownloadingArtifacts RegStep = "Downloading Artifacts" @@ -47,9 +48,12 @@ const ( EnablingAddons RegStep = "Enabling Addons" Done RegStep = "Done" + // Deleting + Deleting RegStep = "Deleting" + Purging RegStep = "Puring home dir" + Stopping RegStep = "Stopping" PowerOff RegStep = "PowerOff" - Deleting RegStep = "Deleting" Pausing RegStep = "Pausing" Unpausing RegStep = "Unpausing" ) @@ -98,7 +102,7 @@ func init() { Stopping: {Stopping, PowerOff, Done}, Pausing: {Pausing, Done}, Unpausing: {Unpausing, Done}, - Deleting: {Deleting, Stopping, Deleting, Done}, + Deleting: {Deleting, Stopping, Done, Purging}, }, } } From 4107a1f6ed0a17654eef6e3ada3e4b17d6ff7e5a Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Wed, 20 Apr 2022 11:11:04 +0200 Subject: [PATCH 02/22] Fix french translation Signed-off-by: Jeff MAURY --- translations/fr.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translations/fr.json b/translations/fr.json index 704e9ec1cd..75b038f727 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -41,7 +41,7 @@ "Access the Kubernetes dashboard running within the minikube cluster": "Accéder au tableau de bord Kubernetes exécuté dans le cluster de minikube", "Access to ports below 1024 may fail on Windows with OpenSSH clients older than v8.1. For more information, see: https://minikube.sigs.k8s.io/docs/handbook/accessing/#access-to-ports-1024-on-windows-requires-root-permission": "Accéder aux ports inférieurs à 1024 peut échouer sur Windows avec les clients OpenSSH antérieurs à v8.1. Pour plus d'information, voir: https://minikube.sigs.k8s.io/docs/handbook/accessing/#access-to-ports-1024-on-windows-requires-root-permission", "Add SSH identity key to SSH authentication agent": "Ajouter la clé d'identité SSH à l'agent d'authentication SSH", - "Add an image into minikube as a local cache, or delete, reload the cached images": "", + "Add an image into minikube as a local cache, or delete, reload the cached images": "Ajouter une image dans minikube en tant que cache local, ou supprimer, recharger les images en cache", "Add an image to local cache.": "Ajouter une image au cache local.", "Add host key to SSH known_hosts file": "Ajouter la clé hôte au fichier SSH known_hosts", "Add image to cache for all running minikube clusters": "Ajouter l'image au cache pour tous les cluster minikube en fonctionnement", @@ -387,7 +387,7 @@ "Locations to fetch the minikube ISO from.": "Emplacements à partir desquels récupérer l'ISO minikube.", "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'.": "Connectez-vous ou exécutez une commande sur une machine avec SSH ; similaire à 'docker-machine ssh'.", "Log into the minikube environment (for debugging)": "Connectez-vous à l'environnement minikube (pour le débogage)", - "Manage cache for images": "", + "Manage cache for images": "Gérer le cache des images", "Manage images": "Gérer les images", "Message Size: {{.size}}": "Taille du message : {{.size}}", "Minimum VirtualBox Version supported: {{.vers}}, current VirtualBox version: {{.cvers}}": "Version minimale de VirtualBox prise en charge : {{.vers}}, version actuelle de VirtualBox : {{.cvers}}", @@ -613,7 +613,7 @@ "Target {{.path}} can not be empty": "La cible {{.path}} ne peut pas être vide", "Test docs have been saved at - {{.path}}": "Les documents de test ont été enregistrés à - {{.path}}", "The \"{{.driver_name}}\" driver should not be used with root privileges.": "Le pilote \"{{.driver_name}}\" ne doit pas être utilisé avec les privilèges root.", - "The \"{{.driver_name}}\" driver should not be used with root privileges. If you wish to continue as root, use --force.": "", + "The \"{{.driver_name}}\" driver should not be used with root privileges. If you wish to continue as root, use --force.": "Le pilote \"{{.driver_name}}\" ne doit pas être utilisé avec les privilèges root. Si vous souhaitez continuer en tant que root, utilisez --force.", "The 'none' driver is designed for experts who need to integrate with an existing VM": "Le pilote 'none' est conçu pour les experts qui doivent s'intégrer à une machine virtuelle existante", "The '{{.addonName}}' addon is enabled": "Le module '{{.addonName}}' est activé", "The '{{.driver}}' driver requires elevated permissions. The following commands will be executed:\\n\\n{{ .example }}\\n": "Le pilote '{{.driver}}' nécessite des autorisations élevées. Les commandes suivantes seront exécutées :\\n\\n{{ .example }}\\n", @@ -793,13 +793,13 @@ "Using image repository {{.name}}": "Utilisation du dépôt d'images {{.name}}…", "Using image {{.registry}}{{.image}}": "Utilisation de l'image {{.registry}}{{.image}}", "Using image {{.registry}}{{.image}} (global image repository)": "Utilisation de l'image {{.registry}}{{.image}} (référentiel d'images global)", - "Using rootless Docker driver was required, but the current Docker does not seem rootless. Try 'docker context use rootless' .": "", - "Using rootless driver was required, but the current driver does not seem rootless": "", - "Using rootless {{.driver_name}} driver": "", + "Using rootless Docker driver was required, but the current Docker does not seem rootless. Try 'docker context use rootless' .": "L'utilisation du pilote Docker sans root était nécessaire, mais le Docker actuel ne semble pas sans root. Essayez 'docker context use rootless' .", + "Using rootless driver was required, but the current driver does not seem rootless": "L'utilisation d'un pilote sans root était nécessaire, mais le pilote actuel ne semble pas sans root", + "Using rootless {{.driver_name}} driver": "Utilisation du pilote {{.driver_name}} sans root", "Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!": "L'utilisation du runtime '{{.runtime}}' avec le pilote 'none' est une configuration non testée !", "Using the {{.driver}} driver based on existing profile": "Utilisation du pilote {{.driver}} basé sur le profil existant", "Using the {{.driver}} driver based on user configuration": "Utilisation du pilote {{.driver}} basé sur la configuration de l'utilisateur", - "Using {{.driver_name}} driver with the root privilege": "", + "Using {{.driver_name}} driver with the root privilege": "Utilisation du pilote {{.driver_name}} avec le privilège root", "Valid components are: {{.valid_extra_opts}}": "Les composants valides sont : {{.valid_extra_opts}}", "Validate your KVM networks. Run: virt-host-validate and then virsh net-list --all": "Validez vos réseaux KVM. Exécutez : virt-host-validate puis virsh net-list --all", "Verify that your HTTP_PROXY and HTTPS_PROXY environment variables are set correctly.": "Vérifiez que vos variables d'environnement HTTP_PROXY et HTTPS_PROXY sont correctement définies.", @@ -830,7 +830,7 @@ "You cannot change the CPUs for an existing minikube cluster. Please first delete the cluster.": "Vous ne pouvez pas modifier les processeurs d'un cluster minikube existant. Veuillez d'abord supprimer le cluster.", "You cannot change the disk size for an existing minikube cluster. Please first delete the cluster.": "Vous ne pouvez pas modifier la taille du disque pour un cluster minikube existant. Veuillez d'abord supprimer le cluster.", "You cannot change the memory size for an existing minikube cluster. Please first delete the cluster.": "Vous ne pouvez pas modifier la taille de la mémoire d'un cluster minikube existant. Veuillez d'abord supprimer le cluster.", - "You have authenticated with a service account that does not have an associated JSON. The GCP Auth requires credentials with a JSON file in order to continue. The image pull secret has been imported.": "", + "You have authenticated with a service account that does not have an associated JSON. The GCP Auth requires credentials with a JSON file in order to continue. The image pull secret has been imported.": "Vous vous êtes authentifié avec un compte de service qui n'a pas de JSON associé. L'authentification GCP nécessite des informations d'identification avec un fichier JSON pour continuer. Le secret d'extraction d'image a été importé.", "You have authenticated with a service account that does not have an associated JSON. The GCP Auth requires credentials with a JSON file to in order to continue. The image pull secret has been imported.": "Vous vous êtes authentifié avec un compte de service qui n'a pas de JSON associé. L'authentification GCP nécessite des informations d'identification avec un fichier JSON pour continuer. Le secret d'extraction d'image a été importé.", "You have chosen to disable the CNI but the \\\"{{.name}}\\\" container runtime requires CNI": "Vous avez choisi de désactiver le CNI mais le runtime du conteneur \\\"{{.name}}\\\" nécessite CNI", "You have selected \"virtualbox\" driver, but there are better options !\nFor better performance and support consider using a different driver: {{.drivers}}\n\nTo turn off this warning run:\n\n\t$ minikube config set WantVirtualBoxDriverWarning false\n\n\nTo learn more about on minikube drivers checkout https://minikube.sigs.k8s.io/docs/drivers/\nTo see benchmarks checkout https://minikube.sigs.k8s.io/docs/benchmarks/cpuusage/\n\n": "Vous avez sélectionné le pilote \"virtualbox\", mais il existe de meilleures options !\nPour de meilleures performances et une meilleure assistance, envisagez d'utiliser un autre pilote: {{.drivers}}\n\nPour désactiver cet avertissement, exécutez :\n\n\t $ minikube config set WantVirtualBoxDriverWarning false\n\n\nPour en savoir plus sur les pilotes minikube, consultez https://minikube.sigs.k8s.io/docs/drivers/\nPour voir les benchmarks, consultez https://minikube.sigs.k8s. io/docs/benchmarks/cpuusage/\n\n", From 504076fd41deaf07a4beee9bfdc1469c8d5ccebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Wed, 20 Apr 2022 17:40:25 +0200 Subject: [PATCH 03/22] Don't use kubelet network-plugin with k8s 1.24 This flag has been removed, and moved to the runtimes. Only docker supports it, the others only support CNI. --- pkg/minikube/bootstrapper/bsutil/kubelet.go | 9 +++- pkg/minikube/cruntime/cruntime.go | 11 +++++ pkg/minikube/cruntime/docker.go | 51 +++++++++++++++++++++ pkg/minikube/node/start.go | 6 +++ test/integration/net_test.go | 18 +++++++- test/integration/start_stop_delete_test.go | 1 + 6 files changed, 93 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/bootstrapper/bsutil/kubelet.go b/pkg/minikube/bootstrapper/bsutil/kubelet.go index 9b99f1a88a..dc3a009996 100644 --- a/pkg/minikube/bootstrapper/bsutil/kubelet.go +++ b/pkg/minikube/bootstrapper/bsutil/kubelet.go @@ -19,9 +19,11 @@ package bsutil import ( "bytes" + "fmt" "os" "path" + "github.com/blang/semver/v4" "github.com/pkg/errors" "k8s.io/minikube/pkg/drivers/kic/oci" "k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/ktmpl" @@ -58,7 +60,12 @@ func extraKubeletOpts(mc config.ClusterConfig, nc config.Node, r cruntime.Manage } if k8s.NetworkPlugin != "" { - extraOpts["network-plugin"] = k8s.NetworkPlugin + // Only CNI is supported in 1.24+, and it is the default + if version.LT(semver.MustParse("1.24.0-alpha.2")) { + extraOpts["network-plugin"] = k8s.NetworkPlugin + } else if k8s.NetworkPlugin != "cni" && mc.KubernetesConfig.ContainerRuntime != constants.Docker { + return nil, fmt.Errorf("invalid network plugin: %s", k8s.NetworkPlugin) + } if k8s.NetworkPlugin == "kubenet" { extraOpts["pod-cidr"] = cni.DefaultPodCIDR diff --git a/pkg/minikube/cruntime/cruntime.go b/pkg/minikube/cruntime/cruntime.go index 76833ed82d..cb09449689 100644 --- a/pkg/minikube/cruntime/cruntime.go +++ b/pkg/minikube/cruntime/cruntime.go @@ -336,3 +336,14 @@ func CheckKernelCompatibility(cr CommandRunner, major, minor int) error { } return nil } + +func ConfigureNetworkPlugin(r Manager, cr CommandRunner, networkPlugin string) error { + // Only supported for Docker with cri-dockerd + if r.Name() != "Docker" { + if networkPlugin != "cni" { + return fmt.Errorf("unknown network plugin: %s", networkPlugin) + } + return nil + } + return dockerConfigureNetworkPlugin(r, cr, networkPlugin) +} diff --git a/pkg/minikube/cruntime/docker.go b/pkg/minikube/cruntime/docker.go index b7745ee3d4..2c0e3e0d96 100644 --- a/pkg/minikube/cruntime/docker.go +++ b/pkg/minikube/cruntime/docker.go @@ -17,12 +17,15 @@ limitations under the License. package cruntime import ( + "bytes" "encoding/json" "fmt" "os" "os/exec" "path" + "path/filepath" "strings" + "text/template" "time" "github.com/blang/semver/v4" @@ -665,3 +668,51 @@ func dockerBoundToContainerd(runner command.Runner) bool { func (r *Docker) ImagesPreloaded(images []string) bool { return dockerImagesPreloaded(r.Runner, images) } + +const ( + CNIBinDir = "/opt/cni/bin" + CNIConfDir = "/etc/cni/net.d" + CNICacheDir = "/var/lib/cni/cache" +) + +func dockerConfigureNetworkPlugin(r Manager, cr CommandRunner, networkPlugin string) error { + if networkPlugin == "" { + // no-op plugin + return nil + } + + args := "" + if networkPlugin == "cni" { + args += " --cni-bin-dir=" + CNIBinDir + args += " --cni-cache-dir=" + CNICacheDir + args += " --cni-conf-dir=" + CNIConfDir + } + + opts := struct { + NetworkPlugin string + ExtraArguments string + }{ + NetworkPlugin: networkPlugin, + ExtraArguments: args, + } + + const CRIDockerServiceConfFile = "/etc/systemd/system/cri-docker.service.d/10-cni.conf" + var CRIDockerServiceConfTemplate = template.Must(template.New("criDockerServiceConfTemplate").Parse(`[Service] +ExecStart= +ExecStart=/usr/bin/cri-dockerd --container-runtime-endpoint fd:// --network-plugin={{.NetworkPlugin}}{{.ExtraArguments}}`)) + + b := bytes.Buffer{} + if err := CRIDockerServiceConfTemplate.Execute(&b, opts); err != nil { + return errors.Wrap(err, "failed to execute template") + } + criDockerService := b.Bytes() + c := exec.Command("sudo", "mkdir", "-p", filepath.Dir(CRIDockerServiceConfFile)) + if _, err := cr.RunCmd(c); err != nil { + return errors.Wrapf(err, "failed to create directory") + } + svc := assets.NewMemoryAssetTarget(criDockerService, CRIDockerServiceConfFile, "0644") + if err := cr.Copy(svc); err != nil { + return errors.Wrap(err, "failed to copy template") + } + return nil +} diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index 278253aa4c..10b3b4d957 100644 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -397,6 +397,12 @@ func configureRuntimes(runner cruntime.CommandRunner, cc config.ClusterConfig, k } } + if kv.GTE(semver.MustParse("1.24.0-alpha.2")) { + if err := cruntime.ConfigureNetworkPlugin(cr, runner, cc.KubernetesConfig.NetworkPlugin); err != nil { + exit.Error(reason.RuntimeEnable, "Failed to configure network plugin", err) + } + } + inUserNamespace := strings.Contains(cc.KubernetesConfig.FeatureGates, "KubeletInUserNamespace=true") err = cr.Enable(disableOthers, forceSystemd(), inUserNamespace) if err != nil { diff --git a/test/integration/net_test.go b/test/integration/net_test.go index 6e46d8f545..834c5e9097 100644 --- a/test/integration/net_test.go +++ b/test/integration/net_test.go @@ -28,8 +28,11 @@ import ( "testing" "time" + "github.com/blang/semver/v4" "k8s.io/minikube/pkg/kapi" + "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/reason" + "k8s.io/minikube/pkg/util" "k8s.io/minikube/pkg/util/retry" ) @@ -122,7 +125,11 @@ func TestNetworkPlugins(t *testing.T) { t.Fatalf("ssh failed: %v", err) } out := rr.Stdout.String() - verifyKubeletFlagsOutput(t, tc.kubeletPlugin, out) + c, err := config.Load(profile) + if err != nil { + t.Errorf("failed to load cluster config: %v", err) + } + verifyKubeletFlagsOutput(t, c.KubernetesConfig.KubernetesVersion, tc.kubeletPlugin, out) }) } @@ -242,7 +249,14 @@ func validateHairpinMode(ctx context.Context, t *testing.T, profile string, hair } } -func verifyKubeletFlagsOutput(t *testing.T, kubeletPlugin, out string) { +func verifyKubeletFlagsOutput(t *testing.T, k8sVersion, kubeletPlugin, out string) { + version, err := util.ParseKubernetesVersion(k8sVersion) + if err != nil { + t.Errorf("failed to parse kubernetes version %s: %v", k8sVersion, err) + } + if version.GTE(semver.MustParse("1.24.0-alpha.2")) { + return + } if kubeletPlugin == "" { if strings.Contains(out, "--network-plugin") && ContainerRuntime() == "docker" { t.Errorf("expected no network plug-in, got %s", out) diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index f4fc967f94..7391ad6905 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -59,6 +59,7 @@ func TestStartStop(t *testing.T) { "--feature-gates", "ServerSideApply=true", "--network-plugin=cni", + // TODO: Remove network-plugin config when newest is 1.24 "--extra-config=kubelet.network-plugin=cni", "--extra-config=kubeadm.pod-network-cidr=192.168.111.111/16", }}, From 43558cd123037a4b2ace6d8a8f561bb9a6f1ba33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Wed, 20 Apr 2022 17:41:52 +0200 Subject: [PATCH 04/22] Don't use kubelet cni-conf-dir with k8s 1.24 --- pkg/minikube/cni/cni.go | 31 +++++++++++++++++++++---------- pkg/minikube/cruntime/docker.go | 3 ++- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/pkg/minikube/cni/cni.go b/pkg/minikube/cni/cni.go index e648a20e06..ca0d767081 100644 --- a/pkg/minikube/cni/cni.go +++ b/pkg/minikube/cni/cni.go @@ -24,6 +24,7 @@ import ( "path" "time" + "github.com/blang/semver/v4" "github.com/pkg/errors" "k8s.io/klog/v2" "k8s.io/minikube/pkg/kapi" @@ -33,6 +34,7 @@ import ( "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/vmpath" + "k8s.io/minikube/pkg/util" ) const ( @@ -211,18 +213,27 @@ func configureCNI(cc *config.ClusterConfig, cnm Manager) error { Network = "kindnet" return nil } - // for containerd and docker: auto-set custom CNI via kubelet's 'cni-conf-dir' param, if not user-specified - eo := fmt.Sprintf("kubelet.cni-conf-dir=%s", CustomConfDir) - if !cc.KubernetesConfig.ExtraOptions.Exists(eo) { - klog.Infof("auto-setting extra-config to %q", eo) - if err := cc.KubernetesConfig.ExtraOptions.Set(eo); err != nil { - return fmt.Errorf("failed auto-setting extra-config %q: %v", eo, err) + version, err := util.ParseKubernetesVersion(cc.KubernetesConfig.KubernetesVersion) + if err != nil { + return err + } + // The CNI configuration is handled by CRI in 1.24+ + if version.LT(semver.MustParse("1.24.0-alpha.2")) { + // for containerd and docker: auto-set custom CNI via kubelet's 'cni-conf-dir' param, if not user-specified + eo := fmt.Sprintf("kubelet.cni-conf-dir=%s", CustomConfDir) + if !cc.KubernetesConfig.ExtraOptions.Exists(eo) { + klog.Infof("auto-setting extra-config to %q", eo) + if err := cc.KubernetesConfig.ExtraOptions.Set(eo); err != nil { + return fmt.Errorf("failed auto-setting extra-config %q: %v", eo, err) + } + ConfDir = CustomConfDir + klog.Infof("extra-config set to %q", eo) + } else { + // respect user-specified custom CNI Config Directory + ConfDir = cc.KubernetesConfig.ExtraOptions.Get("cni-conf-dir", "kubelet") } - ConfDir = CustomConfDir - klog.Infof("extra-config set to %q", eo) } else { - // respect user-specified custom CNI Config Directory - ConfDir = cc.KubernetesConfig.ExtraOptions.Get("cni-conf-dir", "kubelet") + ConfDir = CustomConfDir } } return nil diff --git a/pkg/minikube/cruntime/docker.go b/pkg/minikube/cruntime/docker.go index 2c0e3e0d96..116305643f 100644 --- a/pkg/minikube/cruntime/docker.go +++ b/pkg/minikube/cruntime/docker.go @@ -34,6 +34,7 @@ import ( "k8s.io/klog/v2" "k8s.io/minikube/pkg/minikube/assets" "k8s.io/minikube/pkg/minikube/bootstrapper/images" + "k8s.io/minikube/pkg/minikube/cni" "k8s.io/minikube/pkg/minikube/command" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/docker" @@ -685,7 +686,7 @@ func dockerConfigureNetworkPlugin(r Manager, cr CommandRunner, networkPlugin str if networkPlugin == "cni" { args += " --cni-bin-dir=" + CNIBinDir args += " --cni-cache-dir=" + CNICacheDir - args += " --cni-conf-dir=" + CNIConfDir + args += " --cni-conf-dir=" + cni.ConfDir } opts := struct { From 46849037b2f40d89fde23247e947b19f5c5c5714 Mon Sep 17 00:00:00 2001 From: edwinwalela Date: Wed, 20 Apr 2022 20:23:07 +0300 Subject: [PATCH 05/22] add --audit flag to minikube logs command --- cmd/minikube/cmd/logs.go | 12 ++++++++++-- pkg/minikube/logs/logs.go | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/logs.go b/cmd/minikube/cmd/logs.go index 76e3bc9cbe..eb13d25147 100644 --- a/cmd/minikube/cmd/logs.go +++ b/cmd/minikube/cmd/logs.go @@ -50,6 +50,8 @@ var ( showProblems bool // fileOutput is where to write logs to. If omitted, writes to stdout. fileOutput string + // auditLogs only shows the audit logs + auditLogs bool ) // logsCmd represents the logs command @@ -73,7 +75,13 @@ var logsCmd = &cobra.Command{ exit.Error(reason.Usage, "Failed to create file", err) } } - + if auditLogs { + err := logs.OutputAudit(numberOfLines) + if err != nil { + klog.Errorf("failed to output audit logs: %v", err) + } + return + } logs.OutputOffline(numberOfLines, logOutput) if shouldSilentFail() { @@ -91,7 +99,6 @@ var logsCmd = &cobra.Command{ if err != nil { exit.Error(reason.InternalNewRuntime, "Unable to get runtime", err) } - if followLogs { err := logs.Follow(cr, bs, *co.Config, co.CP.Runner, logOutput) if err != nil { @@ -142,4 +149,5 @@ func init() { logsCmd.Flags().IntVarP(&numberOfLines, "length", "n", 60, "Number of lines back to go within the log") logsCmd.Flags().StringVar(&nodeName, "node", "", "The node to get logs from. Defaults to the primary control plane.") logsCmd.Flags().StringVar(&fileOutput, "file", "", "If present, writes to the provided file instead of stdout.") + logsCmd.Flags().BoolVar(&auditLogs, "audit", false, "Show only the audit logs") } diff --git a/pkg/minikube/logs/logs.go b/pkg/minikube/logs/logs.go index 13593766c0..dfe1e39e26 100644 --- a/pkg/minikube/logs/logs.go +++ b/pkg/minikube/logs/logs.go @@ -208,7 +208,7 @@ func Output(r cruntime.Manager, bs bootstrapper.Bootstrapper, cfg config.Cluster } // outputAudit displays the audit logs. -func outputAudit(lines int) error { +func OutputAudit(lines int) error { out.Styled(style.Empty, "") out.Styled(style.Empty, "==> Audit <==") r, err := audit.Report(lines) @@ -252,7 +252,7 @@ func OutputOffline(lines int, logOutput *os.File) { defer out.SetOutFile(os.Stdout) out.SetErrFile(logOutput) defer out.SetErrFile(os.Stderr) - if err := outputAudit(lines); err != nil { + if err := OutputAudit(lines); err != nil { klog.Errorf("failed to output audit logs: %v", err) } if err := outputLastStart(); err != nil { From caf8e6402ed89ebd30a364227823de0e5eac2cd5 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 20 Apr 2022 15:12:20 -0700 Subject: [PATCH 06/22] fix having flag before command cause problems --- cmd/minikube/main.go | 2 +- pkg/minikube/audit/audit.go | 23 ++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/cmd/minikube/main.go b/cmd/minikube/main.go index 6f12f844b0..b7a56d375a 100644 --- a/cmd/minikube/main.go +++ b/cmd/minikube/main.go @@ -229,7 +229,7 @@ func setFlags(parse bool) { // setLastStartFlags sets the log_file flag to lastStart.txt if start command and user doesn't specify log_file or log_dir flags. func setLastStartFlags() { - if len(os.Args) < 2 || os.Args[1] != "start" { + if pflag.Arg(0) != "start" { return } if pflag.CommandLine.Changed("log_file") || pflag.CommandLine.Changed("log_dir") { diff --git a/pkg/minikube/audit/audit.go b/pkg/minikube/audit/audit.go index 7deb879725..eb4b0ead71 100644 --- a/pkg/minikube/audit/audit.go +++ b/pkg/minikube/audit/audit.go @@ -22,6 +22,7 @@ import ( "strings" "time" + "github.com/spf13/pflag" "github.com/spf13/viper" "k8s.io/klog/v2" "k8s.io/minikube/pkg/minikube/config" @@ -52,10 +53,10 @@ func args() string { // Log details about the executed command. func Log(startTime time.Time) { - if len(os.Args) < 2 || !shouldLog() { + if !shouldLog() { return } - r := newRow(os.Args[1], args(), userName(), version.GetVersion(), startTime, time.Now()) + r := newRow(pflag.Arg(0), args(), userName(), version.GetVersion(), startTime, time.Now()) if err := appendToLog(r); err != nil { klog.Warning(err) } @@ -64,7 +65,7 @@ func Log(startTime time.Time) { // shouldLog returns if the command should be logged. func shouldLog() bool { // in rare chance we get here without a command, don't log - if len(os.Args) < 2 { + if pflag.NArg() == 0 { return false } @@ -74,7 +75,7 @@ func shouldLog() bool { // commands that should not be logged. no := []string{"status", "version"} - a := os.Args[1] + a := pflag.Arg(0) for _, c := range no { if a == c { return false @@ -85,17 +86,5 @@ func shouldLog() bool { // isDeletePurge return true if command is delete with purge flag. func isDeletePurge() bool { - args := os.Args - if len(args) < 2 { - return false - } - if args[1] != "delete" { - return false - } - for _, a := range args { - if a == "--purge" { - return true - } - } - return false + return pflag.Arg(0) == "delete" && viper.GetBool("purge") } From 73b9efa6950af4f04f27239bbdf8da7203940de1 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 20 Apr 2022 16:35:13 -0700 Subject: [PATCH 07/22] updated tests --- pkg/minikube/audit/audit_test.go | 45 ++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/pkg/minikube/audit/audit_test.go b/pkg/minikube/audit/audit_test.go index 7c36ae6556..e91f7d972a 100644 --- a/pkg/minikube/audit/audit_test.go +++ b/pkg/minikube/audit/audit_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + "github.com/spf13/pflag" "github.com/spf13/viper" "k8s.io/minikube/pkg/minikube/config" ) @@ -88,8 +89,11 @@ func TestAudit(t *testing.T) { }) t.Run("shouldLog", func(t *testing.T) { - oldArgs := os.Args - defer func() { os.Args = oldArgs }() + oldCommandLine := pflag.CommandLine + defer func() { + pflag.CommandLine = oldCommandLine + pflag.Parse() + }() tests := []struct { args []string @@ -122,19 +126,22 @@ func TestAudit(t *testing.T) { } for _, test := range tests { - os.Args = test.args + mockArgs(t, test.args) got := shouldLog() if got != test.want { - t.Errorf("os.Args = %q; shouldLog() = %t; want %t", os.Args, got, test.want) + t.Errorf("test.args = %q; shouldLog() = %t; want %t", test.args, got, test.want) } } }) t.Run("isDeletePurge", func(t *testing.T) { - oldArgs := os.Args - defer func() { os.Args = oldArgs }() + oldCommandLine := pflag.CommandLine + defer func() { + pflag.CommandLine = oldCommandLine + pflag.Parse() + }() tests := []struct { args []string @@ -159,12 +166,12 @@ func TestAudit(t *testing.T) { } for _, test := range tests { - os.Args = test.args + mockArgs(t, test.args) got := isDeletePurge() if got != test.want { - t.Errorf("os.Args = %q; isDeletePurge() = %t; want %t", os.Args, got, test.want) + t.Errorf("test.args = %q; isDeletePurge() = %t; want %t", test.args, got, test.want) } } }) @@ -175,6 +182,28 @@ func TestAudit(t *testing.T) { defer func() { os.Args = oldArgs }() os.Args = []string{"minikube"} + oldCommandLine := pflag.CommandLine + defer func() { + pflag.CommandLine = oldCommandLine + pflag.Parse() + }() + mockArgs(t, os.Args) + Log(time.Now()) }) } + +func mockArgs(t *testing.T, args []string) { + if len(args) == 0 { + t.Fatalf("cannot pass an empty slice to mockArgs") + } + fs := pflag.NewFlagSet(args[0], pflag.ExitOnError) + fs.Bool("purge", false, "") + if err := fs.Parse(args[1:]); err != nil { + t.Fatal(err) + } + pflag.CommandLine = fs + if err := viper.BindPFlags(pflag.CommandLine); err != nil { + t.Fatal(err) + } +} From a14df4590103abe3ad6e577c46ca6cc8bba252e6 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Thu, 21 Apr 2022 11:34:25 -0700 Subject: [PATCH 08/22] add /usr/local/bin to PATH env to help find drivers --- gui/window.cpp | 15 +++++++++++++++ gui/window.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/gui/window.cpp b/gui/window.cpp index 5ca295c2a6..6fc3b82906 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -82,6 +82,7 @@ #include #include #include +#include #ifndef QT_NO_TERMWIDGET #include @@ -116,6 +117,14 @@ Window::Window() setWindowIcon(*trayIconIcon); } +QProcessEnvironment Window::setMacEnv() +{ + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + QString path = env.value("PATH"); + env.insert("PATH", path + ":/usr/local/bin"); + return env; +} + void Window::createBasicView() { basicStartButton = new QPushButton(tr("Start")); @@ -523,6 +532,12 @@ bool Window::sendMinikubeCommand(QStringList cmds, QString &text) arguments << cmds; QProcess *process = new QProcess(this); +#if __APPLE__ + if (env.isEmpty()) { + env = setMacEnv(); + } + process->setProcessEnvironment(env); +#endif process->start(program, arguments); this->setCursor(Qt::WaitCursor); bool timedOut = process->waitForFinished(300 * 1000); diff --git a/gui/window.h b/gui/window.h index 95fc57b80f..f4ea230644 100644 --- a/gui/window.h +++ b/gui/window.h @@ -57,6 +57,7 @@ #include #include #include +#include #ifndef QT_NO_SYSTEMTRAYICON @@ -166,12 +167,14 @@ private: void dashboardBrowser(); Cluster createClusterObject(QJsonObject obj); QProcess *dashboardProcess; + QProcessEnvironment env; // Error messaging void outputFailedStart(QString text); QLabel *createLabel(QString title, QString text, QFormLayout *form, bool isLink); void checkForMinikube(); + QProcessEnvironment setMacEnv(); QStackedWidget *stackedWidget; bool isBasicView; }; From bb70d2f97632a76bd4d0937b18e8d6561e2d5a2f Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Thu, 21 Apr 2022 21:09:15 +0000 Subject: [PATCH 09/22] Update auto-generated docs and translations --- site/content/en/docs/commands/delete.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/site/content/en/docs/commands/delete.md b/site/content/en/docs/commands/delete.md index 804c1b0e87..a84f7b4b8c 100644 --- a/site/content/en/docs/commands/delete.md +++ b/site/content/en/docs/commands/delete.md @@ -21,8 +21,9 @@ minikube delete [flags] ### Options ``` - --all Set flag to delete all profiles - --purge Set this flag to delete the '.minikube' folder from your user directory. + --all Set flag to delete all profiles + -o, --output string Format to print stdout in. Options include: [text,json] (default "text") + --purge Set this flag to delete the '.minikube' folder from your user directory. ``` ### Options inherited from parent commands From ce11be3417a1e916f6b19808e67dc6f0da5d1e98 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Thu, 21 Apr 2022 14:28:47 -0700 Subject: [PATCH 10/22] refresh cluster list when reopening GUI --- gui/window.cpp | 8 +++++++- gui/window.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/window.cpp b/gui/window.cpp index 6fc3b82906..9f052e45bc 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -224,12 +224,18 @@ void Window::createActions() connect(minimizeAction, &QAction::triggered, this, &QWidget::hide); restoreAction = new QAction(tr("&Restore"), this); - connect(restoreAction, &QAction::triggered, this, &QWidget::showNormal); + connect(restoreAction, &QAction::triggered, this, &Window::restoreWindow); quitAction = new QAction(tr("&Quit"), this); connect(quitAction, &QAction::triggered, qApp, &QCoreApplication::quit); } +void Window::restoreWindow() +{ + QWidget::showNormal(); + updateClusters(); +} + static QString minikubePath() { QString program = QStandardPaths::findExecutable("minikube"); diff --git a/gui/window.h b/gui/window.h index f4ea230644..ddfa956ef8 100644 --- a/gui/window.h +++ b/gui/window.h @@ -174,6 +174,7 @@ private: QLabel *createLabel(QString title, QString text, QFormLayout *form, bool isLink); void checkForMinikube(); + void restoreWindow(); QProcessEnvironment setMacEnv(); QStackedWidget *stackedWidget; bool isBasicView; From 8f9e09f72b80af62f1742543915efa227f43f88d Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Thu, 21 Apr 2022 16:09:49 -0700 Subject: [PATCH 11/22] add Qt files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index cf6f99bc49..5513f5ca37 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ test/integration/testdata/minikube-linux-amd64-latest-stable /site/resources /_gen +# Qt +*.pro.user +*build-* From 3178a8fd8edec182b9505bf106268b2ea7394e4a Mon Sep 17 00:00:00 2001 From: edwinwalela Date: Fri, 22 Apr 2022 08:55:40 +0300 Subject: [PATCH 12/22] generate docs for logs --audit flag --- site/content/en/docs/commands/logs.md | 1 + translations/de.json | 1 + translations/es.json | 1 + translations/fr.json | 1 + translations/ja.json | 1 + translations/ko.json | 1 + translations/pl.json | 1 + translations/ru.json | 1 + translations/strings.txt | 1 + translations/zh-CN.json | 1 + 10 files changed, 10 insertions(+) diff --git a/site/content/en/docs/commands/logs.md b/site/content/en/docs/commands/logs.md index 27a9aafb6f..48bfa92c25 100644 --- a/site/content/en/docs/commands/logs.md +++ b/site/content/en/docs/commands/logs.md @@ -20,6 +20,7 @@ minikube logs [flags] ### Options ``` + --audit Show only the audit logs --file string If present, writes to the provided file instead of stdout. -f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal. -n, --length int Number of lines back to go within the log (default 60) diff --git a/translations/de.json b/translations/de.json index 804158394b..904ecc6fa9 100644 --- a/translations/de.json +++ b/translations/de.json @@ -574,6 +574,7 @@ "Setting profile failed": "Setzten des Profiles fehlgeschlagen", "Show a list of global command-line options (applies to all commands).": "Zeige eine Liste von globalen Kommandozeilen Parametern (die auf alle Befehle angewendet werden können)", "Show only log entries which point to known problems": "Zeige nur Log Einträge, die auf bekannte Probleme hinweisen", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "Zeige die aktuellsten Journal Einträge und gebe neue Einträge aus, sobald diese im Journal eingetragen werden.", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "Simuliere den Numa Node Count in Minikube, der unterstützte Numa Node Count Bereich ist 1-8 (nur kvm2 Treiber)", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Wechsel des kubectl Kontexts für {{.profile_name}} übersprungen, weil --keep-context gesetzt wurde.", diff --git a/translations/es.json b/translations/es.json index ba72e9494b..c6083ab15f 100644 --- a/translations/es.json +++ b/translations/es.json @@ -581,6 +581,7 @@ "Setting profile failed": "", "Show a list of global command-line options (applies to all commands).": "", "Show only log entries which point to known problems": "", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "", diff --git a/translations/fr.json b/translations/fr.json index 704e9ec1cd..99c5e3bdfa 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -556,6 +556,7 @@ "Setting profile failed": "Échec de la définition du profil", "Show a list of global command-line options (applies to all commands).": "Affiche une liste des options de ligne de commande globales (s'applique à toutes les commandes).", "Show only log entries which point to known problems": "Afficher uniquement les entrées de journal qui pointent vers des problèmes connus", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "Affichez uniquement les entrées de journal les plus récentes et imprimez en continu de nouvelles entrées au fur et à mesure qu'elles sont ajoutées au journal.", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "Simulez le nombre de nœuds numa dans minikube, la plage de nombre de nœuds numa pris en charge est de 1 à 8 (pilote kvm2 uniquement)", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Changement de contexte kubectl ignoré pour {{.profile_name}} car --keep-context a été défini.", diff --git a/translations/ja.json b/translations/ja.json index 0ae287adeb..547b22920c 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -572,6 +572,7 @@ "Setting profile failed": "プロファイルの設定に失敗しました", "Show a list of global command-line options (applies to all commands).": "(全コマンドに適用される) グローバルコマンドラインオプションの一覧を表示します。", "Show only log entries which point to known problems": "既知の問題を示すログエントリーのみ表示します", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "直近のジャーナルエントリーのみ表示し、ジャーナルに追加された新しいエントリーを連続して表示します。", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "minikube 中の NUMA ノードカウントをシミュレートします (対応 NUMA ノードカウント範囲は 1~8 (kvm2 ドライバーのみ))", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "--keep-context が設定されたので、{{.profile_name}} 用 kubectl コンテキストの切替をスキップしました。", diff --git a/translations/ko.json b/translations/ko.json index 9d58f52743..0b6c94f149 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -593,6 +593,7 @@ "Setting profile failed": "프로필 설정이 실패하였습니다", "Show a list of global command-line options (applies to all commands).": "", "Show only log entries which point to known problems": "", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "", diff --git a/translations/pl.json b/translations/pl.json index 7d14a11a93..e878f6159d 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -594,6 +594,7 @@ "Setting profile failed": "Ustawianie profilu nie powiodło się", "Show a list of global command-line options (applies to all commands).": "", "Show only log entries which point to known problems": "Pokaż logi które wskazują na znane problemy", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Zignorowano zmianę kontekstu kubectl dla {{.profile_name}} ponieważ --keep-context zostało przekazane", diff --git a/translations/ru.json b/translations/ru.json index 2b47f5047c..432a1684ad 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -541,6 +541,7 @@ "Setting profile failed": "", "Show a list of global command-line options (applies to all commands).": "", "Show only log entries which point to known problems": "", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "", diff --git a/translations/strings.txt b/translations/strings.txt index 8325e64994..9afd7a6162 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -541,6 +541,7 @@ "Setting profile failed": "", "Show a list of global command-line options (applies to all commands).": "", "Show only log entries which point to known problems": "", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 893955fd13..92619b79f8 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -677,6 +677,7 @@ "Setting profile failed": "设置配置文件失败", "Show a list of global command-line options (applies to all commands).": "显示全局命令行选项列表 (应用于所有命令)。", "Show only log entries which point to known problems": "", + "Show only the audit logs": "", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "", From fd718348cd08fd5e9743b58914847c148cc092f9 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Fri, 22 Apr 2022 11:34:14 -0700 Subject: [PATCH 13/22] remove setting event log path on delete --- cmd/minikube/cmd/delete.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index b2f8ec568c..01e03b6d25 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -207,7 +207,6 @@ func runDelete(cmd *cobra.Command, args []string) { if len(args) > 0 { exit.Message(reason.Usage, "Usage: minikube delete") } - register.SetEventLogPath(localpath.EventLog(ClusterFlagValue())) out.SetJSON(outputFormat == "json") register.Reg.SetStep(register.Deleting) download.CleanUpOlderPreloads() From ada44dd5999d030e43eed2b7a6e02d04d53c7b96 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Fri, 22 Apr 2022 13:38:04 -0700 Subject: [PATCH 14/22] add kubernetes version selector --- gui/window.cpp | 22 +++++++++++++--------- gui/window.h | 1 + 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gui/window.cpp b/gui/window.cpp index 9f052e45bc..725d0e45c4 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -566,6 +566,7 @@ static int cpus = 2; static int memory = 2400; static QString driver = ""; static QString containerRuntime = ""; +static QString k8sVersion = ""; void Window::askName() { @@ -603,24 +604,21 @@ void Window::askCustom() QFormLayout form(&dialog); driverComboBox = new QComboBox; - driverComboBox->addItem("docker"); + driverComboBox->addItems({ "docker", "virtualbox", "vmware", "podman" }); #if __linux__ driverComboBox->addItem("kvm2"); #elif __APPLE__ - driverComboBox->addItem("hyperkit"); - driverComboBox->addItem("parallels"); + driverComboBox->addItems({ "hyperkit", "parallels" }); #else driverComboBox->addItem("hyperv"); #endif - driverComboBox->addItem("virtualbox"); - driverComboBox->addItem("vmware"); - driverComboBox->addItem("podman"); form.addRow(new QLabel(tr("Driver")), driverComboBox); containerRuntimeComboBox = new QComboBox; - containerRuntimeComboBox->addItem("docker"); - containerRuntimeComboBox->addItem("containerd"); - containerRuntimeComboBox->addItem("crio"); + containerRuntimeComboBox->addItems({ "docker", "containerd", "crio" }); form.addRow(new QLabel(tr("Container Runtime")), containerRuntimeComboBox); + k8sVersionComboBox = new QComboBox; + k8sVersionComboBox->addItems({ "stable", "latest", "none" }); + form.addRow(new QLabel(tr("Kubernetes Version")), k8sVersionComboBox); QLineEdit cpuField(QString::number(cpus), &dialog); form.addRow(new QLabel(tr("CPUs")), &cpuField); QLineEdit memoryField(QString::number(memory), &dialog); @@ -638,6 +636,10 @@ void Window::askCustom() driver = driverComboBox->itemText(driverComboBox->currentIndex()); containerRuntime = containerRuntimeComboBox->itemText(containerRuntimeComboBox->currentIndex()); + k8sVersion = k8sVersionComboBox->itemText(k8sVersionComboBox->currentIndex()); + if (k8sVersion == "none") { + k8sVersion = "v0.0.0"; + } cpus = cpuField.text().toInt(); memory = memoryField.text().toInt(); QStringList args = { "-p", @@ -646,6 +648,8 @@ void Window::askCustom() driver, "--container-runtime", containerRuntime, + "--kubernetes-version", + k8sVersion, "--cpus", QString::number(cpus), "--memory", diff --git a/gui/window.h b/gui/window.h index ddfa956ef8..0d6e3a21e0 100644 --- a/gui/window.h +++ b/gui/window.h @@ -154,6 +154,7 @@ private: void askName(); QComboBox *driverComboBox; QComboBox *containerRuntimeComboBox; + QComboBox *k8sVersionComboBox; // Commands void startMinikube(QStringList args); From b1551167ab378203a3c61cd4a40b27f6add26ea3 Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Fri, 22 Apr 2022 21:00:59 +0000 Subject: [PATCH 15/22] Update auto-generated docs and translations --- translations/de.json | 1 + translations/es.json | 1 + translations/fr.json | 1 + translations/ja.json | 1 + translations/ko.json | 1 + translations/pl.json | 1 + translations/ru.json | 1 + translations/strings.txt | 1 + translations/zh-CN.json | 1 + 9 files changed, 9 insertions(+) diff --git a/translations/de.json b/translations/de.json index 804158394b..81e5032e73 100644 --- a/translations/de.json +++ b/translations/de.json @@ -244,6 +244,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Fehler beim Ändern der Berechtigungen für {{.minikube_dir_path}}: {{.error}}", "Failed to check main repository and mirrors for images": "Prüfen des Haupt-Repositories und der Mirrors für Images fehlgeschlagen", "Failed to configure metallb IP {{.profile}}": "Konfiguration der metallb IP {{.profile}} fehlgeschlagen", + "Failed to configure network plugin": "", "Failed to create file": "Erstellen der Datei fehlgeschlagen", "Failed to create runtime": "Erstellen der Runtime fehlgeschlagen", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "Löschen des Clusters {{.name}} fehlgeschlagen, versuche es dennoch erneut.", diff --git a/translations/es.json b/translations/es.json index ba72e9494b..531ab48263 100644 --- a/translations/es.json +++ b/translations/es.json @@ -253,6 +253,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "No se han podido cambiar los permisos de {{.minikube_dir_path}}: {{.error}}", "Failed to check main repository and mirrors for images": "", "Failed to configure metallb IP {{.profile}}": "", + "Failed to configure network plugin": "", "Failed to create file": "No se pudo crear el fichero", "Failed to create runtime": "", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "", diff --git a/translations/fr.json b/translations/fr.json index 75b038f727..8c23b157bc 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -239,6 +239,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Échec de la modification des autorisations pour {{.minikube_dir_path}} : {{.error}}", "Failed to check main repository and mirrors for images": "Échec de la vérification du référentiel principal et des miroirs pour les images", "Failed to configure metallb IP {{.profile}}": "Échec de la configuration de metallb IP {{.profile}}", + "Failed to configure network plugin": "", "Failed to create file": "La création du fichier a échoué", "Failed to create runtime": "Échec de la création de l'environnement d'exécution", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "Échec de la suppression du cluster {{.name}}, réessayez quand même.", diff --git a/translations/ja.json b/translations/ja.json index 0ae287adeb..b5592a99b0 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -245,6 +245,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "{{.minikube_dir_path}} に対する権限の変更に失敗しました: {{.error}}", "Failed to check main repository and mirrors for images": "メインリポジトリーとミラーのイメージのチェックに失敗しました", "Failed to configure metallb IP {{.profile}}": "metallb IP {{.profile}} の設定に失敗しました", + "Failed to configure network plugin": "", "Failed to create file": "ファイルの作成に失敗しました", "Failed to create runtime": "ランタイムの作成に失敗しました", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "{{.name}} クラスターを削除できませんでしたが、処理を続行します。", diff --git a/translations/ko.json b/translations/ko.json index 9d58f52743..23cf6ca02e 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -266,6 +266,7 @@ "Failed to check if machine exists": "머신이 존재하는지 확인하는 데 실패하였습니다", "Failed to check main repository and mirrors for images": "", "Failed to configure metallb IP {{.profile}}": "", + "Failed to configure network plugin": "", "Failed to create file": "", "Failed to create runtime": "", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "", diff --git a/translations/pl.json b/translations/pl.json index 7d14a11a93..cf066f6e32 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -255,6 +255,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Nie udało się zmienić uprawnień pliku {{.minikube_dir_path}}: {{.error}}", "Failed to check main repository and mirrors for images": "", "Failed to configure metallb IP {{.profile}}": "", + "Failed to configure network plugin": "", "Failed to create file": "", "Failed to create runtime": "", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "", diff --git a/translations/ru.json b/translations/ru.json index 2b47f5047c..56440b235d 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -229,6 +229,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "", "Failed to check main repository and mirrors for images": "", "Failed to configure metallb IP {{.profile}}": "", + "Failed to configure network plugin": "", "Failed to create file": "", "Failed to create runtime": "", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "", diff --git a/translations/strings.txt b/translations/strings.txt index 8325e64994..94041cb049 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -229,6 +229,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "", "Failed to check main repository and mirrors for images": "", "Failed to configure metallb IP {{.profile}}": "", + "Failed to configure network plugin": "", "Failed to create file": "", "Failed to create runtime": "", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 893955fd13..bd566450a4 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -314,6 +314,7 @@ "Failed to check main repository and mirrors for images": "", "Failed to check main repository and mirrors for images for images": "无法检测主仓库和镜像仓库中的镜像", "Failed to configure metallb IP {{.profile}}": "", + "Failed to configure network plugin": "", "Failed to create file": "", "Failed to create runtime": "", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "", From 18e5256065532bb338272abbf7e04d45a2ecbc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 23 Apr 2022 15:59:26 +0200 Subject: [PATCH 16/22] Don't add kubelet network-plugin flag in test --- test/integration/start_stop_delete_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index 7391ad6905..75e2595479 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -29,11 +29,13 @@ import ( "strings" "testing" + "github.com/blang/semver/v4" "github.com/docker/machine/libmachine/state" "github.com/google/go-cmp/cmp" "k8s.io/minikube/pkg/minikube/bootstrapper/images" "k8s.io/minikube/pkg/minikube/constants" "k8s.io/minikube/pkg/minikube/detect" + "k8s.io/minikube/pkg/util" ) // TestStartStop tests starting, stopping and restarting a minikube clusters with various Kubernetes versions and configurations @@ -112,6 +114,21 @@ func TestStartStop(t *testing.T) { startArgs = append(startArgs, StartArgs()...) startArgs = append(startArgs, fmt.Sprintf("--kubernetes-version=%s", tc.version)) + version, err := util.ParseKubernetesVersion(tc.version) + if err != nil { + t.Errorf("failed to parse %s: %v", tc.version, err) + } + if version.GTE(semver.MustParse("1.24.0-alpha.2")) { + args := []string{} + for _, arg := range args { + if arg == "--extra-config=kubelet.network-plugin=cni" { + continue + } + args = append(args, arg) + } + startArgs = args + } + t.Run("serial", func(t *testing.T) { serialTests := []struct { name string From 3fdd20f0cbcc053a2b29371b02b4b3205a6009ab Mon Sep 17 00:00:00 2001 From: minikube-bot Date: Mon, 25 Apr 2022 06:05:26 +0000 Subject: [PATCH 17/22] update image constants for kubeadm images --- pkg/minikube/constants/constants_kubeadm_images.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/constants/constants_kubeadm_images.go b/pkg/minikube/constants/constants_kubeadm_images.go index f99fa6e295..5c11be816d 100644 --- a/pkg/minikube/constants/constants_kubeadm_images.go +++ b/pkg/minikube/constants/constants_kubeadm_images.go @@ -18,10 +18,15 @@ package constants var ( KubeadmImages = map[string]map[string]string{ + "v1.25": { + "coredns/coredns": "v1.8.6", + "etcd": "3.5.3-0", + "pause": "3.7", + }, "v1.24": { "coredns/coredns": "v1.8.6", - "etcd": "3.5.1-0", - "pause": "3.6", + "etcd": "3.5.3-0", + "pause": "3.7", }, "v1.23": { "coredns/coredns": "v1.8.6", From 5bb712abfeab0e3e81d670d393224a4a8e7603f5 Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Mon, 25 Apr 2022 08:31:36 +0200 Subject: [PATCH 18/22] Fix french translation Signed-off-by: Jeff MAURY --- translations/fr.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/fr.json b/translations/fr.json index 4d7d37503f..17cd630f91 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -239,7 +239,7 @@ "Failed to change permissions for {{.minikube_dir_path}}: {{.error}}": "Échec de la modification des autorisations pour {{.minikube_dir_path}} : {{.error}}", "Failed to check main repository and mirrors for images": "Échec de la vérification du référentiel principal et des miroirs pour les images", "Failed to configure metallb IP {{.profile}}": "Échec de la configuration de metallb IP {{.profile}}", - "Failed to configure network plugin": "", + "Failed to configure network plugin": "Échec de la configuration du plug-in réseau", "Failed to create file": "La création du fichier a échoué", "Failed to create runtime": "Échec de la création de l'environnement d'exécution", "Failed to delete cluster {{.name}}, proceeding with retry anyway.": "Échec de la suppression du cluster {{.name}}, réessayez quand même.", @@ -557,7 +557,7 @@ "Setting profile failed": "Échec de la définition du profil", "Show a list of global command-line options (applies to all commands).": "Affiche une liste des options de ligne de commande globales (s'applique à toutes les commandes).", "Show only log entries which point to known problems": "Afficher uniquement les entrées de journal qui pointent vers des problèmes connus", - "Show only the audit logs": "", + "Show only the audit logs": "Afficher uniquement les journaux d'audit", "Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.": "Affichez uniquement les entrées de journal les plus récentes et imprimez en continu de nouvelles entrées au fur et à mesure qu'elles sont ajoutées au journal.", "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)": "Simulez le nombre de nœuds numa dans minikube, la plage de nombre de nœuds numa pris en charge est de 1 à 8 (pilote kvm2 uniquement)", "Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "Changement de contexte kubectl ignoré pour {{.profile_name}} car --keep-context a été défini.", From 6c374928cd7b167b4bd726ea14e8f0829a3b4f37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:05:16 +0000 Subject: [PATCH 19/22] Bump contrib.go.opencensus.io/exporter/stackdriver Bumps [contrib.go.opencensus.io/exporter/stackdriver](https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver) from 0.13.11 to 0.13.12. - [Release notes](https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/releases) - [Commits](https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/compare/v0.13.11...v0.13.12) --- updated-dependencies: - dependency-name: contrib.go.opencensus.io/exporter/stackdriver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 3 ++- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cdf39997df..6b509e0224 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( cloud.google.com/go/storage v1.22.0 - contrib.go.opencensus.io/exporter/stackdriver v0.13.11 + contrib.go.opencensus.io/exporter/stackdriver v0.13.12 github.com/Delta456/box-cli-maker/v2 v2.2.2 github.com/GoogleCloudPlatform/docker-credential-gcr v0.0.0-20210713212222-faed5e8b8ca2 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.4.0 @@ -180,6 +180,7 @@ require ( github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.28.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/prometheus v2.5.0+incompatible // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect diff --git a/go.sum b/go.sum index f880d1bc11..3389098632 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,8 @@ cloud.google.com/go/storage v1.22.0/go.mod h1:GbaLEoMqbVm6sx3Z0R++gSiBlgMv6yUi2q cloud.google.com/go/trace v1.0.0/go.mod h1:4iErSByzxkyHWzzlAj63/Gmjz0NH1ASqhJguHpGcr6A= cloud.google.com/go/trace v1.2.0 h1:oIaB4KahkIUOpLSAAjEJ8y2desbjY/x/RfP4O3KAtTI= cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM= -contrib.go.opencensus.io/exporter/stackdriver v0.13.11 h1:YzmWJ2OT2K3ouXyMm5FmFQPoDs5TfLjx6Xn5x5CLN0I= -contrib.go.opencensus.io/exporter/stackdriver v0.13.11/go.mod h1:I5htMbyta491eUxufwwZPQdcKvvgzMB4O9ni41YnIM8= +contrib.go.opencensus.io/exporter/stackdriver v0.13.12 h1:bjBKzIf7/TAkxd7L2utGaLM78bmUWlCval5K9UeElbY= +contrib.go.opencensus.io/exporter/stackdriver v0.13.12/go.mod h1:mmxnWlrvrFdpiOHOhxBaVi1rkc0WOqhgfknj4Yg0SeQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= @@ -986,6 +986,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/prometheus v2.5.0+incompatible h1:7QPitgO2kOFG8ecuRn9O/4L9+10He72rVRJvMXrE9Hg= +github.com/prometheus/prometheus v2.5.0+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= From f17c0e9584807852d1911191314cee70c3b1a212 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:05:23 +0000 Subject: [PATCH 20/22] Bump k8s.io/apimachinery from 0.23.5 to 0.23.6 Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.5 to 0.23.6. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.23.5...v0.23.6) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index cdf39997df..8c557b90da 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 - k8s.io/apimachinery v0.23.5 + k8s.io/apimachinery v0.23.6 k8s.io/client-go v0.23.5 k8s.io/cluster-bootstrap v0.0.0 k8s.io/component-base v0.23.5 diff --git a/go.sum b/go.sum index f880d1bc11..538fbc7a1e 100644 --- a/go.sum +++ b/go.sum @@ -1818,8 +1818,9 @@ k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRp k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= +k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= From 724f4101cbac311752babc730bffb0762c42bd4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:05:34 +0000 Subject: [PATCH 21/22] Bump google.golang.org/api from 0.74.0 to 0.75.0 Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.74.0 to 0.75.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.74.0...v0.75.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index cdf39997df..02703375a6 100644 --- a/go.mod +++ b/go.mod @@ -81,7 +81,7 @@ require ( golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/text v0.3.7 gonum.org/v1/plot v0.11.0 - google.golang.org/api v0.74.0 + google.golang.org/api v0.75.0 gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 @@ -104,7 +104,7 @@ require ( require ( cloud.google.com/go v0.100.2 // indirect - cloud.google.com/go/compute v1.5.0 // indirect + cloud.google.com/go/compute v1.6.0 // indirect cloud.google.com/go/iam v0.3.0 // indirect cloud.google.com/go/monitoring v1.1.0 // indirect cloud.google.com/go/trace v1.2.0 // indirect @@ -200,7 +200,7 @@ require ( golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect + google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 // indirect google.golang.org/grpc v1.45.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index f880d1bc11..0e887d93d9 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,9 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0 h1:XdQIN5mdPTSBVwSIVDuY5e8ZzVAccsHvD3qTEz4zIps= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -1609,8 +1610,9 @@ google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tD google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0 h1:0AYh/ae6l9TDUvIQrDw5QRpM100P6oHgD+o3dYHMzJg= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1699,8 +1701,10 @@ google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 h1:myaecH64R0bIEDjNORIel4iXubqzaHU1K2z8ajBwWcM= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= From 1bcdaeabfdc4bfe549310f101d41c8bd9e6d1e01 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Mon, 25 Apr 2022 11:05:41 -0700 Subject: [PATCH 22/22] update nginx image --- pkg/minikube/assets/addons.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index 5a7981bcf3..efe9fef976 100755 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -238,8 +238,8 @@ var Addons = map[string]*Addon{ "ingress-deploy.yaml", "0640"), }, false, "ingress", "", map[string]string{ - // https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L331 - "IngressController": "ingress-nginx/controller:v1.1.1@sha256:0bc88eb15f9e7f84e8e56c14fa5735aaa488b840983f87bd79b1054190e660de", + // https://github.com/kubernetes/ingress-nginx/blob/6d9a39eda7b180f27b34726d7a7a96d73808ce75/deploy/static/provider/kind/deploy.yaml#L417 + "IngressController": "ingress-nginx/controller:v1.2.0@sha256:d8196e3bc1e72547c5dec66d6556c0ff92a23f6d0919b206be170bc90d5f9185", // https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L621 "KubeWebhookCertgenCreate": "k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660", // https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L673