Skip to content

Commit

Permalink
chore: fix some comments (#6717)
Browse files Browse the repository at this point in the history
Signed-off-by: redismongo <yuanchaowei@outlook.com>
  • Loading branch information
redismongo committed Apr 11, 2024
1 parent 3969b9b commit ec97131
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion changelog/generated/v1.33.0.md
Expand Up @@ -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))
2 changes: 1 addition & 1 deletion hack/generate/samples/internal/go/generate.go
Expand Up @@ -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"))
Expand Down
Expand Up @@ -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())
Expand Down Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion internal/helm/controller/reconcile.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/helm/flags/flag.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion testdata/go/v4/memcached-operator/test/e2e/e2e_test.go
Expand Up @@ -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())

Expand Down
Expand Up @@ -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())

Expand Down
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/faqs/_index.md
Expand Up @@ -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].

Expand Down
Expand Up @@ -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
<testsuites name="scorecard">
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/upgrading-sdk-version/v1.0.0.md
Expand Up @@ -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).

Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit ec97131

Please sign in to comment.