diff --git a/charts/karmada/values.yaml b/charts/karmada/values.yaml index 976ab092f..2e4dd28c1 100644 --- a/charts/karmada/values.yaml +++ b/charts/karmada/values.yaml @@ -11,7 +11,7 @@ global: ## - myRegistryKeySecretName imagePullSecrets: [] - ## #param global.commonLabels Common labels applied to all ressources + ## #param global.commonLabels Common labels applied to all resources ## E.g. ## commonLabels: ## team: infra diff --git a/docs/proposals/service-discovery/README.md b/docs/proposals/service-discovery/README.md index 0c11bf1c8..8a2d6a182 100644 --- a/docs/proposals/service-discovery/README.md +++ b/docs/proposals/service-discovery/README.md @@ -227,7 +227,7 @@ The process of synchronizing `EndpointSlice` from `ServiceProvisionClusters` to When creating the Work, in order to facilitate problem investigation, we should add following annotation to record the original `EndpointSlice` information: * `endpointslice.karmada.io/work-provision-cluster`: the cluster name of the original `EndpointSlice`. Also, we should add the following annotation to the syned `EndpointSlice` record the original information: - * `endpointslice.karmada.io/endpointslice-generation`: the resoruce generation of the `EndpointSlice`, it could be used to check whether the `EndpointSlice` is the newest version. + * `endpointslice.karmada.io/endpointslice-generation`: the resource generation of the `EndpointSlice`, it could be used to check whether the `EndpointSlice` is the newest version. * `endpointslice.karmada.io/provision-cluster`: the cluster location of the original `EndpointSlice`. 1. Karmada will sync the `EndpointSlice`'s work to the member clusters. @@ -274,9 +274,9 @@ We should have following Condition in `MultiClusterService`: ```go MCSServiceAppliedConditionType = "ServiceApplied" - MCSEndpointSliceCollectedCondtionType = "EndpointSliceCollected" + MCSEndpointSliceCollectedConditionType = "EndpointSliceCollected" - MCSEndpointSliceAppliedCondtionType = "EndpointSliceApplied" + MCSEndpointSliceAppliedConditionType = "EndpointSliceApplied" ``` `MCSServiceAppliedConditionType` is used to record the status of `Service` propagation, for example: @@ -361,4 +361,4 @@ Another alternative approach could be to enforce a strict naming convention for \ No newline at end of file +--> diff --git a/hack/install-cli.sh b/hack/install-cli.sh index 87605551a..4b8cc9377 100755 --- a/hack/install-cli.sh +++ b/hack/install-cli.sh @@ -108,7 +108,7 @@ verify_downloader() { return 0 } -# Create tempory directory and cleanup when done +# Create temporary directory and cleanup when done setup_tmp() { TMP_DIR=$(mktemp -d -t "${INSTALL_CLI_TYPE}"-install.XXXXXXXXXX) TMP_METADATA="${TMP_DIR}/${INSTALL_CLI_TYPE}.json" diff --git a/hack/util.sh b/hack/util.sh index 29831e664..a3383ec5f 100755 --- a/hack/util.sh +++ b/hack/util.sh @@ -381,7 +381,7 @@ function util::wait_pod_ready() { } # util::wait_apiservice_ready waits for apiservice state becomes Available until timeout. -# Parmeters: +# Parameters: # - $1: k8s context name, such as "karmada-apiserver" # - $2: apiservice label, such as "app=etcd" # - $3: time out, such as "200s" @@ -402,7 +402,7 @@ function util::wait_apiservice_ready() { } # util::wait_cluster_ready waits for cluster state becomes ready until timeout. -# Parmeters: +# Parameters: # - $1: context name, such as "karmada-apiserver" # - $2: cluster name, such as "member1" function util:wait_cluster_ready() { @@ -444,7 +444,7 @@ function util::kubectl_with_retry() { # util::delete_all_clusters deletes all clusters directly # util::delete_all_clusters actually do three things: delete cluster、remove kubeconfig、record delete log -# Parmeters: +# Parameters: # - $1: KUBECONFIG file of host cluster, such as "~/.kube/karmada.config" # - $2: KUBECONFIG file of member cluster, such as "~/.kube/members.config" # - $3: log file path, such as "/tmp/karmada/" @@ -466,7 +466,7 @@ function util::delete_all_clusters() { # util::create_cluster creates a kubernetes cluster # util::create_cluster creates a kind cluster and don't wait for control plane node to be ready. -# Parmeters: +# Parameters: # - $1: cluster name, such as "host" # - $2: KUBECONFIG file, such as "/var/run/host.config" # - $3: node docker image to use for booting the cluster, such as "kindest/node:v1.19.1" diff --git a/operator/pkg/init.go b/operator/pkg/init.go index c2b2ef29a..60b3815f2 100644 --- a/operator/pkg/init.go +++ b/operator/pkg/init.go @@ -90,7 +90,7 @@ type InitOpt func(o *InitOptions) var _ tasks.InitData = &initData{} // initData defines all the runtime information used when ruing init workflow; -// this data is shared across all the tasks tha are included in the workflow. +// this data is shared across all the tasks that are included in the workflow. type initData struct { sync.Once certs.CertStore diff --git a/operator/pkg/tasks/deinit/component.go b/operator/pkg/tasks/deinit/component.go index a082a8dba..776a3b8ef 100644 --- a/operator/pkg/tasks/deinit/component.go +++ b/operator/pkg/tasks/deinit/component.go @@ -105,7 +105,7 @@ func runRemoveComponentSubTask(component string, workloadNameFunc util.Namefunc, constants.KarmadaOperatorLabel, ) if err != nil { - return fmt.Errorf("failed to cleanup serivce of component %s, err: %w", component, err) + return fmt.Errorf("failed to cleanup service of component %s, err: %w", component, err) } } diff --git a/operator/pkg/util/apiclient/idempotency.go b/operator/pkg/util/apiclient/idempotency.go index 2cd27f2d1..872417cdf 100644 --- a/operator/pkg/util/apiclient/idempotency.go +++ b/operator/pkg/util/apiclient/idempotency.go @@ -95,7 +95,7 @@ func CreateOrUpdateService(client clientset.Interface, service *corev1.Service) // Ignore if the Service is invalid with this error message: // Service "apiserver" is invalid: provided Port is already allocated. if apierrors.IsInvalid(err) && strings.Contains(err.Error(), errAllocated.Error()) { - klog.V(2).ErrorS(err, "failed to create or update serivce", "service", klog.KObj(service)) + klog.V(2).ErrorS(err, "failed to create or update service", "service", klog.KObj(service)) return nil } return fmt.Errorf("unable to create Service: %v", err) diff --git a/operator/pkg/util/util.go b/operator/pkg/util/util.go index 3ca22dc95..6c540f99f 100644 --- a/operator/pkg/util/util.go +++ b/operator/pkg/util/util.go @@ -128,7 +128,7 @@ func Unpack(file, targetPath string) error { } outFile.Close() default: - fmt.Printf("uknown type: %v in %s\n", header.Typeflag, header.Name) + fmt.Printf("unknown type: %v in %s\n", header.Typeflag, header.Name) } } return nil diff --git a/pkg/controllers/hpareplicassyncer/hpa_scale_ref_worker.go b/pkg/controllers/hpareplicassyncer/hpa_scale_ref_worker.go index d9cf5c8a7..67d99f05b 100644 --- a/pkg/controllers/hpareplicassyncer/hpa_scale_ref_worker.go +++ b/pkg/controllers/hpareplicassyncer/hpa_scale_ref_worker.go @@ -34,7 +34,7 @@ import ( type labelEventKind int const ( - // addLabelEvent refer to addding util.RetainReplicasLabel to resource scaled by HPA + // addLabelEvent refer to adding util.RetainReplicasLabel to resource scaled by HPA addLabelEvent labelEventKind = iota // deleteLabelEvent refer to deleting util.RetainReplicasLabel from resource scaled by HPA deleteLabelEvent diff --git a/pkg/dependenciesdistributor/dependencies_distributor.go b/pkg/dependenciesdistributor/dependencies_distributor.go index bc47b68dd..75294c300 100644 --- a/pkg/dependenciesdistributor/dependencies_distributor.go +++ b/pkg/dependenciesdistributor/dependencies_distributor.go @@ -62,7 +62,7 @@ import ( ) const ( - // bindingDependedIdLabelKey is the resoruce id of the independent binding which the attached binding depends on. + // bindingDependedIdLabelKey is the resource id of the independent binding which the attached binding depends on. bindingDependedIdLabelKey = "resourcebinding.karmada.io/depended-id" // bindingDependedByLabelKeyPrefix is the prefix to a label key specifying an attached binding referred by which independent binding. @@ -377,7 +377,7 @@ func (d *DependenciesDistributor) recordDependencies(binding *workv1alpha2.Resou klog.Errorf("Failed to marshal dependencies of binding(%s/%s): %v", binding.Namespace, binding.Name, err) return err } - depenciesStr := string(dependenciesBytes) + dependenciesStr := string(dependenciesBytes) objectAnnotation := binding.GetAnnotations() if objectAnnotation == nil { @@ -385,11 +385,11 @@ func (d *DependenciesDistributor) recordDependencies(binding *workv1alpha2.Resou } // dependencies are not updated, no need to update annotation. - if oldDependencies, exist := objectAnnotation[bindingDependenciesAnnotationKey]; exist && oldDependencies == depenciesStr { + if oldDependencies, exist := objectAnnotation[bindingDependenciesAnnotationKey]; exist && oldDependencies == dependenciesStr { return nil } - objectAnnotation[bindingDependenciesAnnotationKey] = depenciesStr + objectAnnotation[bindingDependenciesAnnotationKey] = dependenciesStr return retry.RetryOnConflict(retry.DefaultRetry, func() (err error) { binding.SetAnnotations(objectAnnotation) diff --git a/pkg/karmadactl/addons/install/install.go b/pkg/karmadactl/addons/install/install.go index e894de14b..a22671ac0 100644 --- a/pkg/karmadactl/addons/install/install.go +++ b/pkg/karmadactl/addons/install/install.go @@ -24,7 +24,7 @@ import ( "github.com/karmada-io/karmada/pkg/karmadactl/addons/search" ) -// Install intall the karmada addons process in Addons +// Install install the karmada addons process in Addons func Install() { addonsinit.Addons["karmada-descheduler"] = descheduler.AddonDescheduler addonsinit.Addons["karmada-metrics-adapter"] = metricsadapter.AddonMetricsAdapter diff --git a/pkg/karmadactl/addons/metricsadapter/metricsadapter.go b/pkg/karmadactl/addons/metricsadapter/metricsadapter.go index b805d9cc7..49221e35f 100644 --- a/pkg/karmadactl/addons/metricsadapter/metricsadapter.go +++ b/pkg/karmadactl/addons/metricsadapter/metricsadapter.go @@ -190,7 +190,7 @@ func installComponentsOnKarmadaControlPlane(opts *addoninit.CommandAddonsEnableO caCertName := fmt.Sprintf("%s.crt", options.CaCertAndKeyName) karmadaCerts, err := opts.KubeClientSet.CoreV1().Secrets(opts.Namespace).Get(context.TODO(), options.KarmadaCertsName, metav1.GetOptions{}) if err != nil { - return fmt.Errorf("error when getting Secret %s/%s, which is used to fetch CaCert for building APISevice: %+v", opts.Namespace, options.KarmadaCertsName, err) + return fmt.Errorf("error when getting Secret %s/%s, which is used to fetch CaCert for building APIService: %+v", opts.Namespace, options.KarmadaCertsName, err) } aaService := &corev1.Service{} diff --git a/pkg/karmadactl/addons/search/search.go b/pkg/karmadactl/addons/search/search.go index fbcd50a00..7b9fef39d 100644 --- a/pkg/karmadactl/addons/search/search.go +++ b/pkg/karmadactl/addons/search/search.go @@ -203,7 +203,7 @@ func installComponentsOnKarmadaControlPlane(opts *addoninit.CommandAddonsEnableO caCertName := fmt.Sprintf("%s.crt", options.CaCertAndKeyName) karmadaCerts, err := opts.KubeClientSet.CoreV1().Secrets(opts.Namespace).Get(context.TODO(), options.KarmadaCertsName, metav1.GetOptions{}) if err != nil { - return fmt.Errorf("error when getting Secret %s/%s, which is used to fetch CaCert for building APISevice: %+v", opts.Namespace, options.KarmadaCertsName, err) + return fmt.Errorf("error when getting Secret %s/%s, which is used to fetch CaCert for building APIService: %+v", opts.Namespace, options.KarmadaCertsName, err) } aaService := &corev1.Service{} diff --git a/pkg/karmadactl/cmdinit/cmdinit.go b/pkg/karmadactl/cmdinit/cmdinit.go index fa1e27c46..5c62fb72f 100644 --- a/pkg/karmadactl/cmdinit/cmdinit.go +++ b/pkg/karmadactl/cmdinit/cmdinit.go @@ -157,7 +157,7 @@ func NewCmdInit(parentCommand string) *cobra.Command { flags.Int32VarP(&opts.KubeControllerManagerReplicas, "karmada-kube-controller-manager-replicas", "", 1, "Karmada kube controller manager replica set") flags.StringVarP(&opts.KarmadaControllerManagerImage, "karmada-controller-manager-image", "", kubernetes.DefaultKarmadaControllerManagerImage, "Karmada controller manager image") flags.Int32VarP(&opts.KarmadaControllerManagerReplicas, "karmada-controller-manager-replicas", "", 1, "Karmada controller manager replica set") - flags.StringVarP(&opts.KarmadaWebhookImage, "karmada-webhook-image", "", kubernetes.DefualtKarmadaWebhookImage, "Karmada webhook image") + flags.StringVarP(&opts.KarmadaWebhookImage, "karmada-webhook-image", "", kubernetes.DefaultKarmadaWebhookImage, "Karmada webhook image") flags.Int32VarP(&opts.KarmadaWebhookReplicas, "karmada-webhook-replicas", "", 1, "Karmada webhook replica set") flags.StringVarP(&opts.KarmadaAggregatedAPIServerImage, "karmada-aggregated-apiserver-image", "", kubernetes.DefaultKarmadaAggregatedAPIServerImage, "Karmada aggregated apiserver image") flags.Int32VarP(&opts.KarmadaAggregatedAPIServerReplicas, "karmada-aggregated-apiserver-replicas", "", 1, "Karmada aggregated apiserver replica set") diff --git a/pkg/karmadactl/cmdinit/kubernetes/deploy.go b/pkg/karmadactl/cmdinit/kubernetes/deploy.go index 8a0b3da1a..c4aae74a0 100644 --- a/pkg/karmadactl/cmdinit/kubernetes/deploy.go +++ b/pkg/karmadactl/cmdinit/kubernetes/deploy.go @@ -93,8 +93,8 @@ var ( DefaultKarmadaSchedulerImage string // DefaultKarmadaControllerManagerImage Karmada controller manager image DefaultKarmadaControllerManagerImage string - // DefualtKarmadaWebhookImage Karmada webhook image - DefualtKarmadaWebhookImage string + // DefaultKarmadaWebhookImage Karmada webhook image + DefaultKarmadaWebhookImage string // DefaultKarmadaAggregatedAPIServerImage Karmada aggregated apiserver image DefaultKarmadaAggregatedAPIServerImage string ) @@ -117,7 +117,7 @@ func init() { DefaultInitImage = "docker.io/alpine:3.18.5" DefaultKarmadaSchedulerImage = fmt.Sprintf("docker.io/karmada/karmada-scheduler:%s", releaseVer.ReleaseVersion()) DefaultKarmadaControllerManagerImage = fmt.Sprintf("docker.io/karmada/karmada-controller-manager:%s", releaseVer.ReleaseVersion()) - DefualtKarmadaWebhookImage = fmt.Sprintf("docker.io/karmada/karmada-webhook:%s", releaseVer.ReleaseVersion()) + DefaultKarmadaWebhookImage = fmt.Sprintf("docker.io/karmada/karmada-webhook:%s", releaseVer.ReleaseVersion()) DefaultKarmadaAggregatedAPIServerImage = fmt.Sprintf("docker.io/karmada/karmada-aggregated-apiserver:%s", releaseVer.ReleaseVersion()) } @@ -696,7 +696,7 @@ func (i *CommandInitOption) karmadaControllerManagerImage() string { // get karmada-webhook image func (i *CommandInitOption) karmadaWebhookImage() string { - if i.ImageRegistry != "" && i.KarmadaWebhookImage == DefualtKarmadaWebhookImage { + if i.ImageRegistry != "" && i.KarmadaWebhookImage == DefaultKarmadaWebhookImage { return i.ImageRegistry + "/karmada-webhook:" + karmadaRelease } return i.KarmadaWebhookImage diff --git a/pkg/karmadactl/cmdinit/utils/format_test.go b/pkg/karmadactl/cmdinit/utils/format_test.go index 77f07796a..f79ff05f6 100644 --- a/pkg/karmadactl/cmdinit/utils/format_test.go +++ b/pkg/karmadactl/cmdinit/utils/format_test.go @@ -96,7 +96,7 @@ func TestFlagsIP(t *testing.T) { want []net.IP }{ { - name: "all ips are vaild", + name: "all ips are valid", ip: "10.0.0.1,10.0.0.2", want: []net.IP{ net.ParseIP("10.0.0.1"), @@ -104,7 +104,7 @@ func TestFlagsIP(t *testing.T) { }, }, { - name: "have invaild ip", + name: "have invalid ip", ip: "10.0.0,10.0.0.2", want: []net.IP{ net.ParseIP("127.0.0.1"), diff --git a/pkg/karmadactl/cmdinit/utils/util.go b/pkg/karmadactl/cmdinit/utils/util.go index cefb14660..a0a829ec5 100644 --- a/pkg/karmadactl/cmdinit/utils/util.go +++ b/pkg/karmadactl/cmdinit/utils/util.go @@ -123,7 +123,7 @@ func DeCompress(file, targetPath string) error { } outFile.Close() default: - fmt.Printf("uknown type: %v in %s\n", header.Typeflag, header.Name) + fmt.Printf("unknown type: %v in %s\n", header.Typeflag, header.Name) } } return nil diff --git a/pkg/karmadactl/interpret/edit.go b/pkg/karmadactl/interpret/edit.go index 8b7872b72..32a013e66 100644 --- a/pkg/karmadactl/interpret/edit.go +++ b/pkg/karmadactl/interpret/edit.go @@ -390,7 +390,7 @@ func parseEditedIntoCustomization(file []byte, into *configv1alpha1.ResourceInte if currRule == nil { return fmt.Errorf("unexpected line %q", line) } - script += string(line) + "\n" + script += line + "\n" } } diff --git a/pkg/karmadactl/promote/promote.go b/pkg/karmadactl/promote/promote.go index a5de22a48..4e19dd82b 100644 --- a/pkg/karmadactl/promote/promote.go +++ b/pkg/karmadactl/promote/promote.go @@ -155,7 +155,7 @@ type CommandPromoteOption struct { // PolicyName is the name of the PropagationPolicy(or ClusterPropagationPolicy), // It defaults to the promoting resource name with a random hash suffix. - // It will be ingnored if AutoCreatePolicy is false. + // It will be ignored if AutoCreatePolicy is false. PolicyName string resource.FilenameOptions diff --git a/pkg/karmadactl/register/register.go b/pkg/karmadactl/register/register.go index f88a5646d..9f3e44759 100644 --- a/pkg/karmadactl/register/register.go +++ b/pkg/karmadactl/register/register.go @@ -308,7 +308,7 @@ func (o *CommandRegisterOption) Validate() error { } if !o.BootstrapToken.UnsafeSkipCAVerification && len(o.BootstrapToken.CACertHashes) == 0 { - return fmt.Errorf("need to varify CACertHashes, or set --discovery-token-unsafe-skip-ca-verification=true") + return fmt.Errorf("need to verify CACertHashes, or set --discovery-token-unsafe-skip-ca-verification=true") } if !filepath.IsAbs(o.CACertPath) || !strings.HasSuffix(o.CACertPath, ".crt") { @@ -592,7 +592,7 @@ func (o *CommandRegisterOption) createSecretAndRBACInMemberCluster(karmadaAgentC StringData: map[string]string{KarmadaKubeconfigName: string(configBytes)}, } - // cerate karmada-kubeconfig secret to be used by karmada-agent component. + // create karmada-kubeconfig secret to be used by karmada-agent component. if err := cmdutil.CreateOrUpdateSecret(o.memberClusterClient, kubeConfigSecret); err != nil { return fmt.Errorf("create secret %s failed: %v", kubeConfigSecret.Name, err) } diff --git a/pkg/karmadactl/util/factory.go b/pkg/karmadactl/util/factory.go index 2ddd766f1..121e3f005 100644 --- a/pkg/karmadactl/util/factory.go +++ b/pkg/karmadactl/util/factory.go @@ -47,7 +47,7 @@ var _ Factory = &factoryImpl{} type factoryImpl struct { cmdutil.Factory - // kubeConfigFlags holds all the flags specificed by user. + // kubeConfigFlags holds all the flags specified by user. // These flags will be inherited by the member cluster's client. kubeConfigFlags *genericclioptions.ConfigFlags } diff --git a/pkg/metricsadapter/provider/custommetrics.go b/pkg/metricsadapter/provider/custommetrics.go index 75a45b856..c0eaa31e6 100755 --- a/pkg/metricsadapter/provider/custommetrics.go +++ b/pkg/metricsadapter/provider/custommetrics.go @@ -68,7 +68,7 @@ func (c *CustomMetricsProvider) GetMetricByName(ctx context.Context, name types. return nil, err } metricValueList := &custom_metrics.MetricValueList{} - metricsChanel := make(chan *custom_metrics.MetricValueList) + metricsChannel := make(chan *custom_metrics.MetricValueList) wg := sync.WaitGroup{} for _, cluster := range clusters { wg.Add(1) @@ -79,15 +79,15 @@ func (c *CustomMetricsProvider) GetMetricByName(ctx context.Context, name types. klog.Warningf("query %s's %s metric from cluster %s failed, err: %+v", info.GroupResource.String(), info.Metric, clusterName, err) return } - metricsChanel <- metrics + metricsChannel <- metrics }(cluster.Name) } go func() { wg.Wait() - close(metricsChanel) + close(metricsChannel) }() for { - metrics, ok := <-metricsChanel + metrics, ok := <-metricsChannel if !ok { break } @@ -119,7 +119,7 @@ func (c *CustomMetricsProvider) GetMetricBySelector(ctx context.Context, namespa } metricValueList := &custom_metrics.MetricValueList{} wg := sync.WaitGroup{} - metricsChanel := make(chan *custom_metrics.MetricValueList) + metricsChannel := make(chan *custom_metrics.MetricValueList) for _, cluster := range clusters { wg.Add(1) go func(clusterName string) { @@ -129,16 +129,16 @@ func (c *CustomMetricsProvider) GetMetricBySelector(ctx context.Context, namespa klog.Warningf("query %s's %s metric from cluster %s failed", info.GroupResource.String(), info.Metric, clusterName) return } - metricsChanel <- metrics + metricsChannel <- metrics }(cluster.Name) } go func() { wg.Wait() - close(metricsChanel) + close(metricsChannel) }() sameMetrics := make(map[string]custom_metrics.MetricValue) for { - metrics, ok := <-metricsChanel + metrics, ok := <-metricsChannel if !ok { break } diff --git a/pkg/metricsadapter/provider/resourcemetrics.go b/pkg/metricsadapter/provider/resourcemetrics.go index 26d6fdda1..080ca20ba 100755 --- a/pkg/metricsadapter/provider/resourcemetrics.go +++ b/pkg/metricsadapter/provider/resourcemetrics.go @@ -114,7 +114,7 @@ func (r *ResourceMetricsProvider) getMetricsParallel(resourceFunc queryResourceF } // step 2. Query metrics from the filtered target clusters - metricsChanel := make(chan interface{}) + metricsChannel := make(chan interface{}) var wg sync.WaitGroup for _, clusterName := range targetClusters { @@ -139,17 +139,17 @@ func (r *ResourceMetricsProvider) getMetricsParallel(resourceFunc queryResourceF // If there are multiple metrics with same name, it's ok because it's an array instead of a map. // The HPA controller will calculate the average utilization with the array. - metricsChanel <- metrics + metricsChannel <- metrics }(clusterName) } go func() { wg.Wait() - close(metricsChanel) + close(metricsChannel) }() for { - data, ok := <-metricsChanel + data, ok := <-metricsChannel if !ok { break } @@ -426,7 +426,7 @@ func (p *PodLister) convertToPodPartialData(pod *corev1.Pod, selector string, la ret.Annotations = map[string]string{} } - //If user sets this annotation, we need to remove it to avoid parsing wrong next. + // If user sets this annotation, we need to remove it to avoid parsing wrong next. if !labelSelector { delete(ret.Annotations, namespaceSpecifiedAnnotation) delete(ret.Annotations, labelSelectorAnnotationInternal) @@ -539,7 +539,7 @@ func (n *NodeLister) List(selector labels.Selector) (ret []*corev1.Node, err err nodeTyped.Annotations = map[string]string{} } - //If user sets this annotation, we need to reset it. + // If user sets this annotation, we need to reset it. nodeTyped.Annotations[labelSelectorAnnotationInternal] = selector.String() ret = append(ret, nodeTyped) } @@ -587,7 +587,7 @@ func (n *NodeLister) Get(name string) (*corev1.Node, error) { nodeTyped.Annotations = map[string]string{} } - //If user sets this annotation, we need to remove it to avoid parsing wrong next. + // If user sets this annotation, we need to remove it to avoid parsing wrong next. delete(nodeTyped.Annotations, labelSelectorAnnotationInternal) } diff --git a/pkg/resourceinterpreter/customized/webhook/request/resourceinterpretercontext.go b/pkg/resourceinterpreter/customized/webhook/request/resourceinterpretercontext.go index d794080e1..139247f6d 100644 --- a/pkg/resourceinterpreter/customized/webhook/request/resourceinterpretercontext.go +++ b/pkg/resourceinterpreter/customized/webhook/request/resourceinterpretercontext.go @@ -76,7 +76,7 @@ func VerifyResourceInterpreterContext(uid types.UID, operation configv1alpha1.In switch r := interpreterContext.(type) { case *configv1alpha1.ResourceInterpreterContext: if r.Response == nil { - return nil, fmt.Errorf("webhook resonse was absent") + return nil, fmt.Errorf("webhook response was absent") } if r.Response.UID != uid { diff --git a/pkg/search/proxy/framework/plugins/cluster/cluster.go b/pkg/search/proxy/framework/plugins/cluster/cluster.go index 3d2f6cd5a..15e6fc71e 100644 --- a/pkg/search/proxy/framework/plugins/cluster/cluster.go +++ b/pkg/search/proxy/framework/plugins/cluster/cluster.go @@ -115,7 +115,7 @@ func (c *Cluster) Connect(ctx context.Context, request framework.ProxyRequest) ( return h, nil } - // Objects get by client via proxy are edited some fields, different from objets in member clusters. + // Objects get by client via proxy are edited some fields, different from objects in member clusters. // So before update, we shall recover these fields. return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { if err = modifyRequest(req, clusterName); err != nil { diff --git a/test/e2e/karmadactl_test.go b/test/e2e/karmadactl_test.go index f946ce17c..d8ea7cd54 100644 --- a/test/e2e/karmadactl_test.go +++ b/test/e2e/karmadactl_test.go @@ -421,7 +421,7 @@ var _ = framework.SerialDescribe("Karmadactl cordon/uncordon testing", ginkgo.La err := createCluster(clusterName, kubeConfigPath, controlPlane, clusterContext) gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) }) - ginkgo.By(fmt.Sprintf("Joinning cluster: %s", clusterName), func() { + ginkgo.By(fmt.Sprintf("Joining cluster: %s", clusterName), func() { cmd := framework.NewKarmadactlCommand(kubeconfig, karmadaContext, karmadactlPath, "", karmadactlTimeout, "join", "--cluster-kubeconfig", kubeConfigPath, "--cluster-context", clusterContext, "--cluster-namespace", "karmada-cluster", clusterName) _, err := cmd.ExecOrDie()