Fix minikube/kubernetes capitalization, make short help consistent

pull/8036/head
Thomas Stromberg 2020-05-07 14:12:10 -07:00
parent 269b938945
commit 436cee2d84
60 changed files with 99 additions and 98 deletions

View File

@ -31,8 +31,8 @@ const cacheImageConfigKey = "cache"
// cacheCmd represents the cache command
var cacheCmd = &cobra.Command{
Use: "cache",
Short: "Add or delete an image from the local cache.",
Long: "Add or delete an image from the local cache.",
Short: "Add, delete, or push a local image into minikube",
Long: "Add, delete, or push a local image into minikube",
}
// addCacheCmd represents the cache add command

View File

@ -69,7 +69,7 @@ const boilerPlate = `
var completionCmd = &cobra.Command{
Use: "completion SHELL",
Short: "Outputs minikube shell completion for the given shell (bash, zsh or fish)",
Short: "Generate command completion for a shell",
Long: longDescription,
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {

View File

@ -24,7 +24,7 @@ import (
// AddonsCmd represents the addons command
var AddonsCmd = &cobra.Command{
Use: "addons SUBCOMMAND [flags]",
Short: "Modify minikube's kubernetes addons",
Short: "Enable or disable a minikube addon",
Long: `addons modifies minikube addons files using subcommands like "minikube addons enable dashboard"`,
Run: func(cmd *cobra.Command, args []string) {
if err := cmd.Help(); err != nil {

View File

@ -177,7 +177,7 @@ var settings = []Setting{
// ConfigCmd represents the config command
var ConfigCmd = &cobra.Command{
Use: "config SUBCOMMAND [flags]",
Short: "Modify minikube config",
Short: "Modify persistent configuration values",
Long: `config modifies minikube config files using subcommands like "minikube config set driver kvm"
Configurable fields: ` + "\n\n" + configurableFields(),
Run: func(cmd *cobra.Command, args []string) {

View File

@ -94,7 +94,7 @@ You can add one by annotating a service with the label {{.labelName}}:{{.addonNa
}
if len(urlString) != 0 {
out.T(out.Celebrate, "Opening kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...", out.V{"namespace_name": namespace, "service_name": svc})
out.T(out.Celebrate, "Opening Kubernetes service {{.namespace_name}}/{{.service_name}} in default browser...", out.V{"namespace_name": namespace, "service_name": svc})
for _, url := range urlString {
if err := browser.OpenURL(url); err != nil {
exit.WithError(fmt.Sprintf("browser failed to open url %s", url), err)
@ -106,7 +106,7 @@ You can add one by annotating a service with the label {{.labelName}}:{{.addonNa
}
func init() {
addonsOpenCmd.Flags().BoolVar(&addonsURLMode, "url", false, "Display the kubernetes addons URL in the CLI instead of opening it in the default browser")
addonsOpenCmd.Flags().BoolVar(&addonsURLMode, "url", false, "Display the Kubernetes addons URL in the CLI instead of opening it in the default browser")
addonsOpenCmd.Flags().BoolVar(&https, "https", false, "Open the addons URL with https instead of http")
addonsOpenCmd.Flags().IntVar(&wait, "wait", service.DefaultWait, "Amount of time to wait for service in seconds")
addonsOpenCmd.Flags().IntVar(&interval, "interval", service.DefaultInterval, "The time interval for each check that wait performs in seconds")

View File

@ -30,7 +30,7 @@ import (
// ProfileCmd represents the profile command
var ProfileCmd = &cobra.Command{
Use: "profile [MINIKUBE_PROFILE_NAME]. You can return to the default minikube profile by running `minikube profile default`",
Short: "Profile gets or sets the current minikube profile",
Short: "Get or list the the current profiles (clusters)",
Long: "profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default`",
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {

View File

@ -51,8 +51,8 @@ var (
// dashboardCmd represents the dashboard command
var dashboardCmd = &cobra.Command{
Use: "dashboard",
Short: "Access the kubernetes dashboard running within the minikube cluster",
Long: `Access the kubernetes dashboard running within the minikube cluster`,
Short: "Access the Kubernetes dashboard running within the minikube cluster",
Long: `Access the Kubernetes dashboard running within the minikube cluster`,
Run: func(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()
co := mustload.Healthy(cname)

View File

@ -51,8 +51,8 @@ var purge bool
// deleteCmd represents the delete command
var deleteCmd = &cobra.Command{
Use: "delete",
Short: "Deletes a local kubernetes cluster",
Long: `Deletes a local kubernetes cluster. This command deletes the VM, and removes all
Short: "Deletes a local Kubernetes cluster",
Long: `Deletes a local Kubernetes cluster. This command deletes the VM, and removes all
associated files.`,
Run: runDelete,
}

View File

@ -122,7 +122,7 @@ func isDockerActive(r command.Runner) bool {
// dockerEnvCmd represents the docker-env command
var dockerEnvCmd = &cobra.Command{
Use: "docker-env",
Short: "Sets up docker env variables; similar to '$(docker-machine env)'",
Short: "Configure environment to use minikube's Docker daemon",
Long: `Sets up docker env variables; similar to '$(docker-machine env)'.`,
Run: func(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()

View File

@ -33,8 +33,8 @@ import (
// kubectlCmd represents the kubectl command
var kubectlCmd = &cobra.Command{
Use: "kubectl",
Short: "Run kubectl",
Long: `Run the kubernetes client, download it if necessary. Remember -- after kubectl!
Short: "Run a kubectl binary matching the cluster version",
Long: `Run the Kubernetes client, download it if necessary. Remember -- after kubectl!
Examples:
minikube kubectl -- --help

View File

@ -48,7 +48,7 @@ var (
// logsCmd represents the logs command
var logsCmd = &cobra.Command{
Use: "logs",
Short: "Gets the logs of the running instance, used for debugging minikube, not user code.",
Short: "Returns logs to debug a local Kubernetes cluster",
Long: `Gets the logs of the running instance, used for debugging minikube, not user code.`,
Run: func(cmd *cobra.Command, args []string) {
co := mustload.Running(ClusterFlagValue())

View File

@ -24,7 +24,7 @@ import (
// nodeCmd represents the set of node subcommands
var nodeCmd = &cobra.Command{
Use: "node",
Short: "Node operations",
Short: "Add, remove, or list additional nodes",
Long: "Operations on nodes",
Run: func(cmd *cobra.Command, args []string) {
exit.UsageT("Usage: minikube node [add|start|stop|delete|list]")

View File

@ -30,7 +30,7 @@ import (
var nodeListCmd = &cobra.Command{
Use: "list",
Short: "List nodes.",
Long: "List existing Minikube nodes.",
Long: "List existing minikube nodes.",
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 0 {
exit.UsageT("Usage: minikube node list")
@ -40,7 +40,7 @@ var nodeListCmd = &cobra.Command{
_, cc := mustload.Partial(cname)
if len(cc.Nodes) < 1 {
glog.Warningf("Did not found any Minikube node.")
glog.Warningf("Did not found any minikube node.")
} else {
glog.Infof("%v", cc.Nodes)
}

View File

@ -28,10 +28,11 @@ import (
// optionsCmd represents the options command
var optionsCmd = &cobra.Command{
Use: "options",
Short: "Show a list of global command-line options (applies to all commands).",
Long: "Show a list of global command-line options (applies to all commands).",
Run: runOptions,
Use: "options",
Short: "Show a list of global command-line options (applies to all commands).",
Long: "Show a list of global command-line options (applies to all commands).",
Hidden: true,
Run: runOptions,
}
// runOptions handles the executes the flow of "minikube options"

View File

@ -41,7 +41,7 @@ var (
// pauseCmd represents the docker-pause command
var pauseCmd = &cobra.Command{
Use: "pause",
Short: "pause containers",
Short: "pause Kubernetes",
Run: runPause,
}

View File

@ -103,7 +103,7 @@ func createExternalSSHClient(d drivers.Driver) (*ssh.ExternalClient, error) {
// podmanEnvCmd represents the podman-env command
var podmanEnvCmd = &cobra.Command{
Use: "podman-env",
Short: "Sets up podman env variables; similar to '$(podman-machine env)'",
Short: "Configure environment to use minikube's Podman daemon",
Long: `Sets up podman env variables; similar to '$(podman-machine env)'.`,
Run: func(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()

View File

@ -58,8 +58,8 @@ var viperWhiteList = []string{
// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
Use: "minikube",
Short: "Minikube is a tool for managing local Kubernetes clusters.",
Long: `Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows.`,
Short: "minikube quickly sets up a local Kubernetes cluster",
Long: `minikube is a tool that provisions and manages local Kubernetes clusters optimized for development workflows.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
for _, path := range dirs {
if err := os.MkdirAll(path, 0777); err != nil {
@ -163,7 +163,7 @@ func setFlagsUsingViper() {
func init() {
translate.DetermineLocale()
RootCmd.PersistentFlags().StringP(config.ProfileName, "p", constants.DefaultClusterName, `The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently.`)
RootCmd.PersistentFlags().StringP(configCmd.Bootstrapper, "b", "kubeadm", "The name of the cluster bootstrapper that will set up the kubernetes cluster.")
RootCmd.PersistentFlags().StringP(configCmd.Bootstrapper, "b", "kubeadm", "The name of the cluster bootstrapper that will set up the Kubernetes cluster.")
groups := templates.CommandGroups{
{

View File

@ -59,8 +59,8 @@ var (
// serviceCmd represents the service command
var serviceCmd = &cobra.Command{
Use: "service [flags] SERVICE",
Short: "Gets the kubernetes URL(s) for the specified service in your local cluster",
Long: `Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time.`,
Short: "Returns a URL to connect to a service",
Long: `Returns the Kubernetes URL for a service in your local cluster. In the case of multiple URLs they will be printed one at a time.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
t, err := template.New("serviceURL").Parse(serviceURLFormat)
if err != nil {
@ -101,7 +101,7 @@ You may select another namespace by using 'minikube service {{.service}} -n <nam
func init() {
serviceCmd.Flags().StringVarP(&namespace, "namespace", "n", "default", "The service namespace")
serviceCmd.Flags().BoolVar(&serviceURLMode, "url", false, "Display the kubernetes service URL in the CLI instead of opening it in the default browser")
serviceCmd.Flags().BoolVar(&serviceURLMode, "url", false, "Display the Kubernetes service URL in the CLI instead of opening it in the default browser")
serviceCmd.Flags().BoolVar(&https, "https", false, "Open the service URL with https instead of http")
serviceCmd.Flags().IntVar(&wait, "wait", service.DefaultWait, "Amount of time to wait for a service in seconds")
serviceCmd.Flags().IntVar(&interval, "interval", service.DefaultInterval, "The initial time interval for each check that wait performs in seconds")

View File

@ -38,7 +38,7 @@ var (
// sshCmd represents the docker-ssh command
var sshCmd = &cobra.Command{
Use: "ssh",
Short: "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'",
Short: "Log into the minikube environment (for debugging)",
Long: "Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'.",
Run: func(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()

View File

@ -83,8 +83,8 @@ func init() {
// startCmd represents the start command
var startCmd = &cobra.Command{
Use: "start",
Short: "Starts a local kubernetes cluster",
Long: "Starts a local kubernetes cluster",
Short: "Starts a local Kubernetes cluster",
Long: "Starts a local Kubernetes cluster",
Run: runStart,
}
@ -436,7 +436,7 @@ func maybeDeleteAndRetry(cc config.ClusterConfig, n config.Node, existingAddons
func kubectlVersion(path string) (string, error) {
j, err := exec.Command(path, "version", "--client", "--output=json").Output()
if err != nil {
// really old kubernetes clients did not have the --output parameter
// really old Kubernetes clients did not have the --output parameter
b, err := exec.Command(path, "version", "--client", "--short").Output()
if err != nil {
return "", errors.Wrap(err, "exec")
@ -839,7 +839,7 @@ func validateFlags(cmd *cobra.Command, drvName string) {
out.WarningT("Using the '{{.runtime}}' runtime with the 'none' driver is an untested configuration!", out.V{"runtime": runtime})
}
// conntrack is required starting with kubernetes 1.18, include the release candidates for completion
// conntrack is required starting with Kubernetes 1.18, include the release candidates for completion
version, _ := util.ParseKubernetesVersion(getKubernetesVersion(nil))
if version.GTE(semver.MustParse("1.18.0-beta.1")) {
if _, err := exec.LookPath("conntrack"); err != nil {

View File

@ -131,7 +131,7 @@ func initMinikubeFlags() {
startCmd.Flags().String(criSocket, "", "The cri socket path to be used.")
startCmd.Flags().String(networkPlugin, "", "The name of the network plugin.")
startCmd.Flags().Bool(enableDefaultCNI, false, "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \"--network-plugin=cni\".")
startCmd.Flags().StringSlice(waitComponents, kverify.DefaultWaitList, fmt.Sprintf("comma separated list of kubernetes components to verify and wait for after starting a cluster. defaults to %q, available options: %q . other acceptable values are 'all' or 'none', 'true' and 'false'", strings.Join(kverify.DefaultWaitList, ","), strings.Join(kverify.AllComponentsList, ",")))
startCmd.Flags().StringSlice(waitComponents, kverify.DefaultWaitList, fmt.Sprintf("comma separated list of Kubernetes components to verify and wait for after starting a cluster. defaults to %q, available options: %q . other acceptable values are 'all' or 'none', 'true' and 'false'", strings.Join(kverify.DefaultWaitList, ","), strings.Join(kverify.AllComponentsList, ",")))
startCmd.Flags().Duration(waitTimeout, 6*time.Minute, "max time to wait per Kubernetes core services to be healthy.")
startCmd.Flags().Bool(nativeSSH, true, "Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'.")
startCmd.Flags().Bool(autoUpdate, true, "If set, automatically updates drivers to the latest version. Defaults to true.")
@ -142,16 +142,16 @@ func initMinikubeFlags() {
startCmd.Flags().Bool(forceSystemd, false, "If set, force the container runtime to use sytemd as cgroup manager. Currently available for docker and crio. Defaults to false.")
}
// initKubernetesFlags inits the commandline flags for kubernetes related options
// initKubernetesFlags inits the commandline flags for Kubernetes related options
func initKubernetesFlags() {
startCmd.Flags().String(kubernetesVersion, "", fmt.Sprintf("The kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for %s, 'latest' for %s). Defaults to 'stable'.", constants.DefaultKubernetesVersion, constants.NewestKubernetesVersion))
startCmd.Flags().String(kubernetesVersion, "", fmt.Sprintf("The Kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for %s, 'latest' for %s). Defaults to 'stable'.", constants.DefaultKubernetesVersion, constants.NewestKubernetesVersion))
startCmd.Flags().Var(&config.ExtraOptions, "extra-config",
`A set of key=value pairs that describe configuration that may be passed to different components.
The key should be '.' separated, and the first part before the dot is the component to apply the configuration to.
Valid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler
Valid kubeadm parameters: `+fmt.Sprintf("%s, %s", strings.Join(bsutil.KubeadmExtraArgsWhitelist[bsutil.KubeadmCmdParam], ", "), strings.Join(bsutil.KubeadmExtraArgsWhitelist[bsutil.KubeadmConfigParam], ",")))
startCmd.Flags().String(featureGates, "", "A set of key=value pairs that describe feature gates for alpha/experimental features.")
startCmd.Flags().String(dnsDomain, constants.ClusterDNSDomain, "The cluster dns domain name used in the kubernetes cluster")
startCmd.Flags().String(dnsDomain, constants.ClusterDNSDomain, "The cluster dns domain name used in the Kubernetes cluster")
startCmd.Flags().Int(apiServerPort, constants.APIServerPort, "The apiserver listening port")
startCmd.Flags().String(apiServerName, constants.APIServerName, "The authoritative apiserver hostname for apiserver certificates and connectivity. This can be used if you want to make the apiserver available from outside the machine")
startCmd.Flags().StringArrayVar(&apiServerNames, "apiserver-names", nil, "A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine")

View File

@ -91,10 +91,10 @@ kubelet: {{.Kubelet}}
// statusCmd represents the status command
var statusCmd = &cobra.Command{
Use: "status",
Short: "Gets the status of a local kubernetes cluster",
Long: `Gets the status of a local kubernetes cluster.
Exit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left.
Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK)`,
Short: "Gets the status of a local Kubernetes cluster",
Long: `Gets the status of a local Kubernetes cluster.
Exit status contains the status of minikube's VM, cluster and Kubernetes encoded on it's bits in this order from right to left.
Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for Kubernetes NOK)`,
Run: func(cmd *cobra.Command, args []string) {
if output != "text" && statusFormat != defaultStatusFormat {

View File

@ -36,8 +36,8 @@ import (
// stopCmd represents the stop command
var stopCmd = &cobra.Command{
Use: "stop",
Short: "Stops a running local kubernetes cluster",
Long: `Stops a local kubernetes cluster running in Virtualbox. This command stops the VM
Short: "Stops a running local Kubernetes cluster",
Long: `Stops a local Kubernetes cluster running in Virtualbox. This command stops the VM
itself, leaving all files intact. The cluster can be started again with the "start" command.`,
Run: runStop,
}

View File

@ -42,7 +42,7 @@ var cleanup bool
// tunnelCmd represents the tunnel command
var tunnelCmd = &cobra.Command{
Use: "tunnel",
Short: "tunnel makes services of type LoadBalancer accessible on localhost",
Short: "Connect to LoadBalancer services",
Long: `tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP. for a detailed example see https://minikube.sigs.k8s.io/docs/tasks/loadbalancer`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
RootCmd.PersistentPreRun(cmd, args)

View File

@ -27,7 +27,7 @@ import (
// updateContextCmd represents the update-context command
var updateContextCmd = &cobra.Command{
Use: "update-context",
Short: "Verify the IP address of the running cluster in kubeconfig.",
Short: "Update kubeconfig in case of an IP or port change",
Long: `Retrieves the IP address of the running cluster, checks it
with IP in kubeconfig, and corrects kubeconfig if incorrect.`,
Run: func(cmd *cobra.Command, args []string) {

View File

@ -74,7 +74,7 @@ func generateTarball(kubernetesVersion, containerRuntime, tarballFilename string
// will need to do this to enable the container run-time service
sv, err := util.ParseKubernetesVersion(kubernetesVersion)
if err != nil {
return errors.Wrap(err, "Failed to parse kubernetes version")
return errors.Wrap(err, "Failed to parse Kubernetes version")
}
co := cruntime.Config{

View File

@ -42,7 +42,7 @@ var (
)
func init() {
flag.StringVar(&k8sVersion, "kubernetes-version", "", "desired kubernetes version, for example `v1.17.2`")
flag.StringVar(&k8sVersion, "kubernetes-version", "", "desired Kubernetes version, for example `v1.17.2`")
flag.Parse()
if k8sVersion != "" {
k8sVersions = append(k8sVersions, k8sVersion)

View File

@ -41,7 +41,7 @@ type CreateParams struct {
NodeLabel string // label the nodes so we can clean up by node name
Role string // currently only role supported is control-plane
Mounts []Mount // volume mounts
APIServerPort int // kubernetes api server port
APIServerPort int // Kubernetes api server port
PortMappings []PortMapping // ports to map to container from host
CPUs string // number of cpu cores assign to container
Memory string // memory (mbs) to assign to the container

View File

@ -50,9 +50,9 @@ type Config struct {
OCIBinary string // oci tool to use (docker, podman,...)
ImageDigest string // image name with sha to use for the node
Mounts []oci.Mount // mounts
APIServerPort int // kubernetes api server port inside the container
APIServerPort int // Kubernetes api server port inside the container
PortMappings []oci.PortMapping // container port mappings
Envs map[string]string // key,value of environment variables passed to the node
KubernetesVersion string // kubernetes version to install
KubernetesVersion string // Kubernetes version to install
ContainerRuntime string // container runtime kic is running
}

View File

@ -71,7 +71,7 @@ func DocForCommand(command *cobra.Command) (string, error) {
// after every command, cobra automatically appends
// ### SEE ALSO
// * [minikube addons](minikube_addons.md) - Modify minikube's kubernetes addons
// * [minikube addons](minikube_addons.md) - Modify minikube's Kubernetes addons
// ###### Auto generated by spf13/cobra on 1-Apr-2020
// help text which is unnecessary info after every subcommand

View File

@ -35,7 +35,7 @@ func rewriteFlags(command *cobra.Command) error {
rewrites := map[string][]rewrite{
"start": []rewrite{{
flag: "driver",
usage: "Used to specify the driver to run kubernetes in. The list of available drivers depends on operating system.",
usage: "Used to specify the driver to run Kubernetes in. The list of available drivers depends on operating system.",
}, {
flag: "mount-string",
usage: "The argument to pass the minikube mount command on start.",

View File

@ -59,7 +59,7 @@ func ClientConfig(context string) (*rest.Config, error) {
return c, nil
}
// Client gets the kubernetes client for a kubectl context name
// Client gets the Kubernetes client for a kubectl context name
func Client(context string) (*kubernetes.Clientset, error) {
c, err := ClientConfig(context)
if err != nil {

View File

@ -33,7 +33,7 @@ type LogOptions struct {
Follow bool
}
// Bootstrapper contains all the methods needed to bootstrap a kubernetes cluster
// Bootstrapper contains all the methods needed to bootstrap a Kubernetes cluster
type Bootstrapper interface {
StartCluster(config.ClusterConfig) error
UpdateCluster(config.ClusterConfig) error

View File

@ -41,7 +41,7 @@ func GenerateKubeadmYAML(cc config.ClusterConfig, n config.Node, r cruntime.Mana
k8s := cc.KubernetesConfig
version, err := util.ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return nil, errors.Wrap(err, "parsing kubernetes version")
return nil, errors.Wrap(err, "parsing Kubernetes version")
}
// parses a map of the feature gates for kubeadm and component

View File

@ -35,7 +35,7 @@ func extraKubeletOpts(mc config.ClusterConfig, nc config.Node, r cruntime.Manage
k8s := mc.KubernetesConfig
version, err := util.ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return nil, errors.Wrap(err, "parsing kubernetes version")
return nil, errors.Wrap(err, "parsing Kubernetes version")
}
extraOpts, err := extraConfigForComponent(Kubelet, k8s.ExtraOptions, version)

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kverify verifies a running kubernetes cluster is healthy
// Package kverify verifies a running Kubernetes cluster is healthy
package kverify
import (

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kverify verifies a running kubernetes cluster is healthy
// Package kverify verifies a running Kubernetes cluster is healthy
package kverify
import (

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kverify verifies a running kubernetes cluster is healthy
// Package kverify verifies a running Kubernetes cluster is healthy
package kverify
import (

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kverify verifies a running kubernetes cluster is healthy
// Package kverify verifies a running Kubernetes cluster is healthy
package kverify
import (

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kverify verifies a running kubernetes cluster is healthy
// Package kverify verifies a running Kubernetes cluster is healthy
package kverify
import (

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package kverify verifies a running kubernetes cluster is healthy
// Package kverify verifies a running Kubernetes cluster is healthy
package kverify
import (

View File

@ -47,7 +47,7 @@ func AdjustResourceLimits(c command.Runner) error {
return nil
}
// ExistingConfig checks if there are config files from possible previous kubernetes cluster
// ExistingConfig checks if there are config files from possible previous Kubernetes cluster
func ExistingConfig(c command.Runner) error {
args := append([]string{"ls"}, expectedRemoteArtifacts...)
_, err := c.RunCmd(exec.Command("sudo", args...))

View File

@ -66,7 +66,7 @@ import (
// Bootstrapper is a bootstrapper using kubeadm
type Bootstrapper struct {
c command.Runner
k8sClient *kubernetes.Clientset // kubernetes client used to verify pods inside cluster
k8sClient *kubernetes.Clientset // Kubernetes client used to verify pods inside cluster
contextName string
}
@ -172,7 +172,7 @@ func (k *Bootstrapper) clearStaleConfigs(cfg config.ClusterConfig) error {
func (k *Bootstrapper) init(cfg config.ClusterConfig) error {
version, err := util.ParseKubernetesVersion(cfg.KubernetesConfig.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
return errors.Wrap(err, "parsing Kubernetes version")
}
extraFlags := bsutil.CreateFlagsFromExtraArgs(cfg.KubernetesConfig.ExtraOptions)
@ -197,7 +197,7 @@ func (k *Bootstrapper) init(cfg config.ClusterConfig) error {
skipSystemVerification := false
// Allow older kubeadm versions to function with newer Docker releases.
if version.LT(semver.MustParse("1.13.0")) {
glog.Infof("ignoring SystemVerification for kubeadm because of old kubernetes version %v", version)
glog.Infof("ignoring SystemVerification for kubeadm because of old Kubernetes version %v", version)
skipSystemVerification = true
}
if driver.BareMetal(cfg.Driver) && r.Name() == "Docker" {
@ -494,7 +494,7 @@ func (k *Bootstrapper) restartCluster(cfg config.ClusterConfig) error {
version, err := util.ParseKubernetesVersion(cfg.KubernetesConfig.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
return errors.Wrap(err, "parsing Kubernetes version")
}
phase := "alpha"
@ -642,7 +642,7 @@ func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error {
version, err := util.ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
return errors.Wrap(err, "parsing Kubernetes version")
}
ka := bsutil.InvokeKubeadm(k8s.KubernetesVersion)
@ -870,7 +870,7 @@ func (k *Bootstrapper) applyKICOverlay(cfg config.ClusterConfig) error {
// applyNodeLabels applies minikube labels to all the nodes
func (k *Bootstrapper) applyNodeLabels(cfg config.ClusterConfig) error {
// time cluster was created. time format is based on ISO 8601 (RFC 3339)
// converting - and : to _ because of kubernetes label restriction
// converting - and : to _ because of Kubernetes label restriction
createdAtLbl := "minikube.k8s.io/updated_at=" + time.Now().Format("2006_01_02T15_04_05_0700")
verLbl := "minikube.k8s.io/version=" + version.GetVersion()
commitLbl := "minikube.k8s.io/commit=" + version.GetGitCommitID()

View File

@ -34,7 +34,7 @@ import (
)
// This init function is used to set the logtostderr variable to false so that INFO level log info does not clutter the CLI
// INFO lvl logging is displayed due to the kubernetes api calling flag.Set("logtostderr", "true") in its init()
// INFO lvl logging is displayed due to the Kubernetes api calling flag.Set("logtostderr", "true") in its init()
// see: https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/util/logs/logs.go#L32-L34
func init() {
if err := flag.Set("logtostderr", "false"); err != nil {

View File

@ -149,17 +149,17 @@ func encode(w io.Writer, m MinikubeConfig) error {
return err
}
// Load loads the kubernetes and machine config for the current machine
// Load loads the Kubernetes and machine config for the current machine
func Load(profile string) (*ClusterConfig, error) {
return DefaultLoader.LoadConfigFromFile(profile)
}
// Write writes the kubernetes and machine config for the current machine
// Write writes the Kubernetes and machine config for the current machine
func Write(profile string, cc *ClusterConfig) error {
return DefaultLoader.WriteConfigToFile(profile, cc)
}
// Loader loads the kubernetes and machine config based on the machine profile name
// Loader loads the Kubernetes and machine config based on the machine profile name
type Loader interface {
LoadConfigFromFile(profile string, miniHome ...string) (*ClusterConfig, error)
WriteConfigToFile(profileName string, cc *ClusterConfig, miniHome ...string) error

View File

@ -89,7 +89,7 @@ type KubernetesConfig struct {
CRISocket string
NetworkPlugin string
FeatureGates string // https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
ServiceCIDR string // the subnet which kubernetes services will be deployed to
ServiceCIDR string // the subnet which Kubernetes services will be deployed to
ImageRepository string
LoadBalancerStartIP string // currently only used by MetalLB addon
LoadBalancerEndIP string // currently only used by MetalLB addon

View File

@ -26,7 +26,7 @@ import (
)
const (
// DefaultKubernetesVersion is the default kubernetes version
// DefaultKubernetesVersion is the default Kubernetes version
DefaultKubernetesVersion = "v1.18.1"
// NewestKubernetesVersion is the newest Kubernetes version to test against
NewestKubernetesVersion = "v1.18.1"
@ -83,7 +83,7 @@ var (
// DockerDaemonEnvs is list of docker-daemon related environment variables.
DockerDaemonEnvs = [3]string{DockerHostEnv, DockerTLSVerifyEnv, DockerCertPathEnv}
// DefaultMinipath is the default Minikube path (under the home directory)
// DefaultMinipath is the default minikube path (under the home directory)
DefaultMinipath = filepath.Join(homedir.HomeDir(), ".minikube")
// KubeconfigEnvVar is the env var to check for the Kubernetes client config
@ -102,7 +102,7 @@ var (
// ImageCacheDir is the path to the image cache directory
ImageCacheDir = localpath.MakeMiniPath("cache", "images")
// DefaultNamespaces are kubernetes namespaces used by minikube, including addons
// DefaultNamespaces are Kubernetes namespaces used by minikube, including addons
DefaultNamespaces = []string{
"kube-system",
"kubernetes-dashboard",

View File

@ -35,7 +35,7 @@ import (
"k8s.io/minikube/pkg/minikube/sysinit"
)
// KubernetesContainerPrefix is the prefix of each kubernetes container
// KubernetesContainerPrefix is the prefix of each Kubernetes container
const KubernetesContainerPrefix = "k8s_"
// ErrISOFeature is the error returned when disk image is missing features

View File

@ -100,7 +100,7 @@ func MachineType(name string) string {
return "bare metal machine"
}
// IsKIC checks if the driver is a kubernetes in container
// IsKIC checks if the driver is a Kubernetes in container
func IsKIC(name string) bool {
return name == Docker || name == Podman
}

View File

@ -33,7 +33,7 @@ type Settings struct {
// The name of the cluster for this context
ClusterName string
// ClusterServerAddress is the address of the kubernetes cluster
// ClusterServerAddress is the address of the Kubernetes cluster
ClusterServerAddress string
// ClientCertificate is the path to a client cert file for TLS.

View File

@ -75,7 +75,7 @@ func CACert() string {
return filepath.Join(MiniPath(), "ca.crt")
}
// MachinePath returns the Minikube machine path of a machine
// MachinePath returns the minikube machine path of a machine
func MachinePath(machine string, miniHome ...string) string {
miniPath := MiniPath()
if len(miniHome) > 0 {

View File

@ -41,7 +41,7 @@ const (
cacheImageConfigKey = "cache"
)
// BeginCacheKubernetesImages caches images required for kubernetes version in the background
// BeginCacheKubernetesImages caches images required for Kubernetes version in the background
func beginCacheKubernetesImages(g *errgroup.Group, imageRepository string, k8sVersion string, cRuntime string) {
// TODO: remove imageRepository check once #7695 is fixed
if imageRepository == "" && download.PreloadExists(k8sVersion, cRuntime) {

View File

@ -75,14 +75,14 @@ type Starter struct {
ExistingAddons map[string]bool
}
// Start spins up a guest and starts the kubernetes node.
// Start spins up a guest and starts the Kubernetes node.
func Start(starter Starter, apiServer bool) (*kubeconfig.Settings, error) {
// wait for preloaded tarball to finish downloading before configuring runtimes
waitCacheRequiredImages(&cacheGroup)
sv, err := util.ParseKubernetesVersion(starter.Node.KubernetesVersion)
if err != nil {
return nil, errors.Wrap(err, "Failed to parse kubernetes version")
return nil, errors.Wrap(err, "Failed to parse Kubernetes version")
}
// configure the runtime (docker, containerd, crio)

View File

@ -36,7 +36,7 @@ const (
None = "none"
)
// IsKIC checks if the driver is a kubernetes in container
// IsKIC checks if the driver is a Kubernetes in container
func IsKIC(name string) bool {
return name == Docker || name == Podman
}

View File

@ -48,7 +48,7 @@ const (
DefaultInterval = 1
)
// K8sClient represents a kubernetes client
// K8sClient represents a Kubernetes client
type K8sClient interface {
GetCoreClient(string) (typed_core.CoreV1Interface, error)
}
@ -197,7 +197,7 @@ func printURLsForService(c typed_core.CoreV1Interface, ip, service, namespace st
func CheckService(cname string, namespace string, service string) error {
client, err := K8s.GetCoreClient(cname)
if err != nil {
return errors.Wrap(err, "Error getting kubernetes client")
return errors.Wrap(err, "Error getting Kubernetes client")
}
svc, err := client.Services(namespace).Get(service, meta.GetOptions{})

View File

@ -112,7 +112,7 @@ func (p *hostPathProvisioner) Delete(volume *core.PersistentVolume) error {
// StartStorageProvisioner will start storage provisioner server
func StartStorageProvisioner(pvDir string) error {
glog.Infof("Initializing the Minikube storage provisioner...")
glog.Infof("Initializing the minikube storage provisioner...")
config, err := rest.InClusterConfig()
if err != nil {
return err

View File

@ -90,7 +90,7 @@ func MaybeChownDirRecursiveToMinikubeUser(dir string) error {
return nil
}
// ParseKubernetesVersion parses the kubernetes version
// ParseKubernetesVersion parses the Kubernetes version
func ParseKubernetesVersion(version string) (semver.Version, error) {
return semver.Make(version[1:])
}

View File

@ -88,7 +88,7 @@ func validateIngressAddon(ctx context.Context, t *testing.T, profile string) {
client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get kubernetes client: %v", client)
t.Fatalf("failed to get Kubernetes client: %v", client)
}
if err := kapi.WaitForDeploymentToStabilize(client, "kube-system", "ingress-nginx-controller", Minutes(6)); err != nil {
@ -158,7 +158,7 @@ func validateIngressAddon(ctx context.Context, t *testing.T, profile string) {
func validateRegistryAddon(ctx context.Context, t *testing.T, profile string) {
client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get kubernetes client for %s : %v", profile, err)
t.Fatalf("failed to get Kubernetes client for %s : %v", profile, err)
}
start := time.Now()
@ -232,7 +232,7 @@ func validateRegistryAddon(ctx context.Context, t *testing.T, profile string) {
func validateMetricsServerAddon(ctx context.Context, t *testing.T, profile string) {
client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get kubernetes client for %s: %v", profile, err)
t.Fatalf("failed to get Kubernetes client for %s: %v", profile, err)
}
start := time.Now()
@ -274,7 +274,7 @@ func validateMetricsServerAddon(ctx context.Context, t *testing.T, profile strin
func validateHelmTillerAddon(ctx context.Context, t *testing.T, profile string) {
client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get kubernetes client for %s: %v", profile, err)
t.Fatalf("failed to get Kubernetes client for %s: %v", profile, err)
}
start := time.Now()

View File

@ -132,7 +132,7 @@ func validateServiceStable(ctx context.Context, t *testing.T, profile string) {
client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get kubernetes client for %q: %v", profile, err)
t.Fatalf("failed to get Kubernetes client for %q: %v", profile, err)
}
// Start the "nginx" pod.

View File

@ -123,7 +123,7 @@ func TestVersionUpgrade(t *testing.T) {
t.Logf("Attempting to downgrade Kubernetes (should fail)")
args = append([]string{"start", "-p", profile, "--memory=2200", fmt.Sprintf("--kubernetes-version=%s", constants.OldestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
if rr, err := Run(t, exec.CommandContext(ctx, tf.Name(), args...)); err == nil {
t.Fatalf("downgrading kubernetes should not be allowed. expected to see error but got %v for %q", err, rr.Command())
t.Fatalf("downgrading Kubernetes should not be allowed. expected to see error but got %v for %q", err, rr.Command())
}
t.Logf("Attempting restart after unsuccessful downgrade")