From ec9713150817da01017a02c73a73014c10ed6e33 Mon Sep 17 00:00:00 2001 From: redismongo <166003694+redismongo@users.noreply.github.com> Date: Thu, 11 Apr 2024 21:27:00 +0800 Subject: [PATCH] chore: fix some comments (#6717) Signed-off-by: redismongo --- changelog/generated/v1.33.0.md | 2 +- hack/generate/samples/internal/go/generate.go | 2 +- .../go/memcached-with-customization/e2e_test_code.go | 4 ++-- internal/helm/controller/reconcile.go | 2 +- internal/helm/flags/flag.go | 2 +- .../go/v4/memcached-operator/test/e2e/e2e_test.go | 2 +- .../memcached-operator/test/e2e/e2e_test.go | 2 +- .../en/docs/building-operators/golang/tutorial.md | 2 +- website/content/en/docs/faqs/_index.md | 2 +- .../en/docs/testing-operators/scorecard/_index.md | 2 +- .../content/en/docs/upgrading-sdk-version/v1.0.0.md | 2 +- .../upgrading-sdk-version/version-upgrade-guide.md | 12 ++++++------ 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/changelog/generated/v1.33.0.md b/changelog/generated/v1.33.0.md index fc22f9de28a..5b02ca3f760 100644 --- a/changelog/generated/v1.33.0.md +++ b/changelog/generated/v1.33.0.md @@ -13,4 +13,4 @@ ### Bug Fixes -- `operator-sdk olm install`: fix a bug where the retry logic would not retry until the the command's timeout was reached, resulting in early exiting of the command before the specified timeout was reached. ([#6613](https://github.com/operator-framework/operator-sdk/pull/6613)) +- `operator-sdk olm install`: fix a bug where the retry logic would not retry until the command's timeout was reached, resulting in early exiting of the command before the specified timeout was reached. ([#6613](https://github.com/operator-framework/operator-sdk/pull/6613)) diff --git a/hack/generate/samples/internal/go/generate.go b/hack/generate/samples/internal/go/generate.go index c079acc46bd..fa66c9a9bba 100644 --- a/hack/generate/samples/internal/go/generate.go +++ b/hack/generate/samples/internal/go/generate.go @@ -24,7 +24,7 @@ func GenerateMemcachedSamples(binaryPath, rootPath string) { // TODO: replace the Memcached implementation and update the tutorial // to use the deploy.image/v1-alpha plugin to do the scaffold instead - // to create an empty scaffold add add all code. So that, we can also + // to create an empty scaffold add all code. So that, we can also // ensure that the tutorial follows the good practices withcustomization.GenerateSample(binaryPath, filepath.Join(rootPath, "go", "v4")) withcustomization.GenerateSample(binaryPath, filepath.Join(rootPath, "go", "v4", "monitoring")) diff --git a/hack/generate/samples/internal/go/memcached-with-customization/e2e_test_code.go b/hack/generate/samples/internal/go/memcached-with-customization/e2e_test_code.go index cb0102fc8e4..010d4bdf707 100644 --- a/hack/generate/samples/internal/go/memcached-with-customization/e2e_test_code.go +++ b/hack/generate/samples/internal/go/memcached-with-customization/e2e_test_code.go @@ -242,7 +242,7 @@ var _ = Describe("memcached", Ordered, func() { _, err = utils.Run(cmd) ExpectWithOffset(1, err).NotTo(HaveOccurred()) - By("loading the the manager(Operator) image on Kind") + By("loading the manager(Operator) image on Kind") err = utils.LoadImageToKindClusterWithName(operatorImage) ExpectWithOffset(1, err).NotTo(HaveOccurred()) @@ -455,7 +455,7 @@ var _ = Describe("memcached", Ordered, func() { _, err = utils.Run(cmd) ExpectWithOffset(1, err).NotTo(HaveOccurred()) - By("loading the the manager(Operator) image on Kind") + By("loading the manager(Operator) image on Kind") err = utils.LoadImageToKindClusterWithName(operatorImage) ExpectWithOffset(1, err).NotTo(HaveOccurred()) diff --git a/internal/helm/controller/reconcile.go b/internal/helm/controller/reconcile.go index f35dbbaf26e..c4fd9c99ee4 100644 --- a/internal/helm/controller/reconcile.go +++ b/internal/helm/controller/reconcile.go @@ -109,7 +109,7 @@ func (r HelmOperatorReconciler) Reconcile(ctx context.Context, request reconcile reconcileResult := reconcile.Result{RequeueAfter: r.ReconcilePeriod} // Determine the correct reconcile period based on the existing value in the reconciler and the // annotations in the custom resource. If a reconcile period is specified in the custom resource - // annotations, this value will take precedence over the the existing reconcile period value + // annotations, this value will take precedence over the existing reconcile period value // (which came from either the command-line flag or the watches.yaml file). finalReconcilePeriod, err := determineReconcilePeriod(r.ReconcilePeriod, o) if err != nil { diff --git a/internal/helm/flags/flag.go b/internal/helm/flags/flag.go index ea2fb70e960..efaea3c2efd 100644 --- a/internal/helm/flags/flag.go +++ b/internal/helm/flags/flag.go @@ -47,7 +47,7 @@ type Flags struct { flagSet *pflag.FlagSet } -// AddTo - Add the helm operator flags to the the flagset +// AddTo - Add the helm operator flags to the flagset func (f *Flags) AddTo(flagSet *pflag.FlagSet) { // Store flagset internally to be used for lookups later. f.flagSet = flagSet diff --git a/testdata/go/v4/memcached-operator/test/e2e/e2e_test.go b/testdata/go/v4/memcached-operator/test/e2e/e2e_test.go index cfdc7e660b8..0d07bc23e17 100644 --- a/testdata/go/v4/memcached-operator/test/e2e/e2e_test.go +++ b/testdata/go/v4/memcached-operator/test/e2e/e2e_test.go @@ -102,7 +102,7 @@ var _ = Describe("memcached", Ordered, func() { _, err = utils.Run(cmd) ExpectWithOffset(1, err).NotTo(HaveOccurred()) - By("loading the the manager(Operator) image on Kind") + By("loading the manager(Operator) image on Kind") err = utils.LoadImageToKindClusterWithName(operatorImage) ExpectWithOffset(1, err).NotTo(HaveOccurred()) diff --git a/testdata/go/v4/monitoring/memcached-operator/test/e2e/e2e_test.go b/testdata/go/v4/monitoring/memcached-operator/test/e2e/e2e_test.go index 4bab98307a2..7ecea06753b 100644 --- a/testdata/go/v4/monitoring/memcached-operator/test/e2e/e2e_test.go +++ b/testdata/go/v4/monitoring/memcached-operator/test/e2e/e2e_test.go @@ -118,7 +118,7 @@ var _ = Describe("memcached", Ordered, func() { _, err = utils.Run(cmd) ExpectWithOffset(1, err).NotTo(HaveOccurred()) - By("loading the the manager(Operator) image on Kind") + By("loading the manager(Operator) image on Kind") err = utils.LoadImageToKindClusterWithName(operatorImage) ExpectWithOffset(1, err).NotTo(HaveOccurred()) diff --git a/website/content/en/docs/building-operators/golang/tutorial.md b/website/content/en/docs/building-operators/golang/tutorial.md index 9d4b4ec274f..35b9f6afdb6 100644 --- a/website/content/en/docs/building-operators/golang/tutorial.md +++ b/website/content/en/docs/building-operators/golang/tutorial.md @@ -89,7 +89,7 @@ controllers/memcached_controller.go This will scaffold the Memcached resource API at `api/v1alpha1/memcached_types.go` and the controller at `controllers/memcached_controller.go`. -**Note:** In this tutorial we will be providing all the steps to show you how to implement an operator project. However, as a follow up you might want to check the [Deploy Image plugin][deploy-image-plugin-doc] with which it is possible to have the whole code generated to deploy and manage an Operand(image). To do so, you can use the the command `$ operator-sdk create api --group cache --version v1alpha1 --kind Memcached --plugins="deploy-image/v1-alpha" --image=memcached:1.4.36-alpine --image-container-command="memcached,-m=64,modern,-v" --run-as-user="1001"` +**Note:** In this tutorial we will be providing all the steps to show you how to implement an operator project. However, as a follow up you might want to check the [Deploy Image plugin][deploy-image-plugin-doc] with which it is possible to have the whole code generated to deploy and manage an Operand(image). To do so, you can use the command `$ operator-sdk create api --group cache --version v1alpha1 --kind Memcached --plugins="deploy-image/v1-alpha" --image=memcached:1.4.36-alpine --image-container-command="memcached,-m=64,modern,-v" --run-as-user="1001"` **Note:** This guide will cover the default case of a single group API. If you would like to support Multi-Group APIs see the [Single Group to Multi-Group][multigroup-kubebuilder-doc] doc. diff --git a/website/content/en/docs/faqs/_index.md b/website/content/en/docs/faqs/_index.md index f7368f3fbc9..47235edbb26 100644 --- a/website/content/en/docs/faqs/_index.md +++ b/website/content/en/docs/faqs/_index.md @@ -4,7 +4,7 @@ linkTitle: FAQ weight: 12 --- -## What are the the differences between Kubebuilder and Operator-SDK? +## What are the differences between Kubebuilder and Operator-SDK? Kubebuilder and Operator SDK are both projects that allow you to quickly create and manage an operator project. Operator SDK uses Kubebuilder under the hood to do so for Go projects, such that the `operator-sdk` CLI tool will work with a project created by `kubebuilder`. Therefore each project makes use of [controller-runtime][controller-runtime] and will have the same [basic layout][kb-doc-what-is-a-basic-project]. For further information also check the [SDK Project Layout][project-doc]. diff --git a/website/content/en/docs/testing-operators/scorecard/_index.md b/website/content/en/docs/testing-operators/scorecard/_index.md index 48116de0683..98305b4dfcf 100644 --- a/website/content/en/docs/testing-operators/scorecard/_index.md +++ b/website/content/en/docs/testing-operators/scorecard/_index.md @@ -228,7 +228,7 @@ See an example of the JSON format produced by a scorecard test: ### XML format -See the example below for the results of a scorecard test formatted in XML. The scorecard tool formats the XML output for XUnit schema compatability. This format makes it easier for post-processing the test results. +See the example below for the results of a scorecard test formatted in XML. The scorecard tool formats the XML output for XUnit schema compatibility. This format makes it easier for post-processing the test results. ```xml diff --git a/website/content/en/docs/upgrading-sdk-version/v1.0.0.md b/website/content/en/docs/upgrading-sdk-version/v1.0.0.md index fecefa1315f..f20afabc0fc 100644 --- a/website/content/en/docs/upgrading-sdk-version/v1.0.0.md +++ b/website/content/en/docs/upgrading-sdk-version/v1.0.0.md @@ -339,7 +339,7 @@ _See [#3484](https://github.com/operator-framework/operator-sdk/pull/3484) for m ### Removed package `pkg/ready` -Use `controller-runtime`'s readyz server that supports custom http handlers. Add add a `healthz.Checker` (e.g. [`healthz.Ping`]( +Use `controller-runtime`'s readyz server that supports custom http handlers. Add a `healthz.Checker` (e.g. [`healthz.Ping`]( https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/healthz/healthz.go#L187-L188)) using [`manager.AddReadyzCheck`](https://github.com/kubernetes-sigs/controller-runtime/blob/229c3c357d9e6b07c3d6774010c35161a82b08f9/pkg/manager/manager.go#L73-L74). diff --git a/website/content/en/docs/upgrading-sdk-version/version-upgrade-guide.md b/website/content/en/docs/upgrading-sdk-version/version-upgrade-guide.md index 2a4e4e1ab1f..b6a3ec5aa74 100644 --- a/website/content/en/docs/upgrading-sdk-version/version-upgrade-guide.md +++ b/website/content/en/docs/upgrading-sdk-version/version-upgrade-guide.md @@ -353,7 +353,7 @@ Upon updating the project to `v0.8.2` the following breaking changes apply: **modules** -- Ensure the the following `replace` directives are present in your `go.mod` file: +- Ensure the following `replace` directives are present in your `go.mod` file: ``` replace ( github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0 @@ -414,7 +414,7 @@ Upon updating the project to `v0.8.2` the following breaking changes apply: **modules** -- Ensure the the following `replace` directives are present in your `go.mod` file: +- Ensure the following `replace` directives are present in your `go.mod` file: ``` // Pinned to kubernetes-1.14.1 replace ( @@ -506,7 +506,7 @@ Using `dep` is no longer supported. Follow [Go's official blog post about migrat **modules** -- Ensure the the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: +- Ensure the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: ``` require ( @@ -574,7 +574,7 @@ func printVersion() { **modules** -- Ensure the the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: +- Ensure the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: ``` require ( @@ -641,7 +641,7 @@ For further detailed information see [CHANGELOG](https://github.com/operator-fra **modules** -- Ensure the the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: +- Ensure the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: ``` require ( @@ -868,7 +868,7 @@ If you are using any external helm v2 tooling with the your helm operator-manage **modules** -- Ensure the the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: +- Ensure the following `require` modules and `replace` directives with the specific versions are present in your `go.mod` file: ``` require (