Skip to content

Commit

Permalink
align sdk with kb
Browse files Browse the repository at this point in the history
  • Loading branch information
Camila Macedo committed Feb 3, 2021
1 parent fbce7e7 commit a214328
Show file tree
Hide file tree
Showing 216 changed files with 1,115 additions and 736 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ test-sanity: generate fix ## Test repo formatting, linting, etc.
go run ./release/changelog/gen-changelog.go -validate-only
go vet ./...
$(SCRIPTS_DIR)/fetch golangci-lint 1.31.0 && $(TOOLS_DIR)/golangci-lint run
git diff --exit-code # diff again to ensure other checks don't change repo
# todo(camilamacedo86): fix issue to generate the docs. It shows diff order for the plugins versions suppported each time.
git diff --exit-code -- . ':(exclude)/website/content/en/docs/cli/operator-sdk.md' # diff again to ensure other checks don't change repo

.PHONY: test-links
test-links: ## Test doc links
Expand Down
67 changes: 67 additions & 0 deletions changelog/fragments/kb-1001d36a1bab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
For Go-based operators, fix layout of the PROJECT file that stores the resources. More info: [#kubernetes-sigs/kubebuilder#1899](https://github.com/kubernetes-sigs/kubebuilder/pull/1899).
kind: "bugfix"
breaking: false
migration:
header: Fix data scaffolded in PROJECT file
body: >
It is valid only for projects scaffolded with SDK 1.3.0 release or that was upgraded to go/v3 using the changes of this release.
In the PROJECT file, replace `- crdVersion: <crdVersion>` with `- api.crdVersion: <crdVersion>` and `webhookVersion: <webhookVersion>` with `webhooks.webhookVersion: <webhookVersion>`. Ensure that the resources in your project file results are like:
```yml
resources:
- api:
crdVersion: v1
group: cache
kind: Memcached
version: v1alpha1
webhooks:
webhookVersion: v1
```
- description: >
Remove spaces from maker comments to make them machine-readable. More info: [#kubernetes-sigs/kubebuilder#1868](https://github.com/kubernetes-sigs/kubebuilder/pull/1868).
kind: "bugfix"
breaking: false
migration:
header: Update the comments makers of your project to make them machibe redable.
body: >
Update your project files removing the maker's comments spaces as follows:
- Replace `# +kubebuilder` with `#+kubebuilder`
- Replace `// +groupName` with `//+groupName`
- (For Go-based operators only) Replace `// +operator-sdk` with `//+operator-sdk`
- description: >
Add help option for operator projects scaffolded with the tool.
kind: "addition"
breaking: false
migration:
header: Update your Makefile to have a help command for your project helpers
body: >
You can check the Makefile files of the testdata samples in the tag release branch to know how you can update
your Makefile accordingly to have an help option. See: https://github.com/operator-framework/operator-sdk/tree/v1.4.x/testdata
- description: >
Add support for markers for files with the `yml` extension. More info: [#kubernetes-sigs/kubebuilder#1907](https://github.com/kubernetes-sigs/kubebuilder/pull/1907).
kind: "addition"
breaking: false
- description: >
For Go-based operators using go/v3 plugin only, add the `--force` option to the `create webhook` command. More info: [#kubernetes-sigs/kubebuilder#1903](https://github.com/kubernetes-sigs/kubebuilder/pull/1903).
kind: "addition"
breaking: false
- description: >
For Go-based operators, fix `--force` option to recreate the files via `create api` command. More info: [#kubernetes-sigs/kubebuilder#1903](https://github.com/kubernetes-sigs/kubebuilder/pull/1903).
kind: "bugfix"
breaking: false
- description: >
For Go-based operators using go/v3 plugin only, upgrade the sigs.k8s.io/kubebuilder-declarative-pattern dependency (used only to gen api with --pattern=addon). More info: [#kubernetes-sigs/kubebuilder#1946](https://github.com/kubernetes-sigs/kubebuilder/pull/1946).
kind: "change"
breaking: false
- description: >
For Go-based operators, fix the name of the files to be edit in the comments of `[kind]_types.go` files. More info: [#kubernetes-sigs/kubebuilder#1927](https://github.com/kubernetes-sigs/kubebuilder/pull/1927).
kind: "bugfix"
breaking: false
header: Fix the name of the files in the comments on the `<kind>_types.go` files
body: >
When we use `$operator-sdk create api` or `$operator-sdk create webhook`, it generates a file like `[kind]_types.go`. In this file, there is a comment that indicates which file to change when adding a field.
You can update it with the correct value if you wich by replacing the Kind for lower case, such as replace `Edit Memcached_types.go to remove/update` with `Edit memcached_types.go to remove/update`
105 changes: 105 additions & 0 deletions changelog/fragments/kb-79ecd519373a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
For Go-based operators, fix layout of the PROJECT file that stores the resources. More info: [#kubernetes-sigs/kubebuilder#1899](https://github.com/kubernetes-sigs/kubebuilder/pull/1899).
kind: "bugfix"
breaking: false
migration:
header: Fix data scaffolded in PROJECT file
body: >
It is valid only for projects scaffolded with SDK 1.3.0 release or that was upgraded to go/v3 using the changes of this release.
In the PROJECT file, replace `- crdVersion: <crdVersion>` with `- api.crdVersion: <crdVersion>` and `webhookVersion: <webhookVersion>` with `webhooks.webhookVersion: <webhookVersion>`. Ensure that the resources in your project file results are like:
```yml
resources:
- api:
crdVersion: v1
group: cache
kind: Memcached
version: v1alpha1
webhooks:
webhookVersion: v1
```
- description: >
Remove spaces from maker comments to make them machine-readable. More info: [#kubernetes-sigs/kubebuilder#1868](https://github.com/kubernetes-sigs/kubebuilder/pull/1868).
kind: "bugfix"
breaking: false
migration:
header: Update the comments makers of your project to make them machibe redable.
body: >
Update your project files removing the maker's comments spaces as follows:
- Replace `# +kubebuilder` with `#+kubebuilder`
- Replace `// +groupName` with `//+groupName`
- (For Go-based operators only) Replace `// +operator-sdk` with `//+operator-sdk`
- description: >
Add help option for Makefile targets.
kind: "addition"
breaking: false
migration:
header: Update your Makefile to have a help command for your project helpers
body: >
You can check the Makefile files of the testdata samples in the tag release branch to know how you can update
your Makefile accordingly to have an help option. See: https://github.com/operator-framework/operator-sdk/tree/v1.4.x/testdata/
- description: >
Add support for markers for files with the `yml` extension. More info: [#kubernetes-sigs/kubebuilder#1907](https://github.com/kubernetes-sigs/kubebuilder/pull/1907).
kind: "addition"
breaking: false
- description: >
For Go-based operators using go/v3 plugin only, add the `--force` option to the `create webhook` command. More info: [#kubernetes-sigs/kubebuilder#1903](https://github.com/kubernetes-sigs/kubebuilder/pull/1903).
kind: "addition"
breaking: false
- description: >
For Go-based operators, fix `--force` option to recreate the files via `create api` command. More info: [#kubernetes-sigs/kubebuilder#1903](https://github.com/kubernetes-sigs/kubebuilder/pull/1903).
kind: "bugfix"
breaking: false
- description: >
For Go-based operators using go/v3 plugin only, upgrade the sigs.k8s.io/kubebuilder-declarative-pattern dependency (used only to gen api with --pattern=addon). More info: [#kubernetes-sigs/kubebuilder#1946](https://github.com/kubernetes-sigs/kubebuilder/pull/1946).
kind: "change"
breaking: false
- description: >
For Go-based operators, fix the name of the files to be edit in the comments of `[kind]_types.go` files. More info: [#kubernetes-sigs/kubebuilder#1927](https://github.com/kubernetes-sigs/kubebuilder/pull/1927).
kind: "bugfix"
breaking: false
header: Fix the name of the files in the comments on the `<kind>_types.go` files
body: >
When we use `$operator-sdk create api` or `$operator-sdk create webhook`, it generates a file like `[kind]_types.go`. In this file, there is a comment that indicates which file to change when adding a field.
You can update it with the correct value if you wich by replacing the Kind for lower case, such as replace `Edit Memcached_types.go to remove/update` with `Edit memcached_types.go to remove/update`
- description: >
Upgrade the `kube-rbac-proxy` image version from 0.5.0 to 0.8.0 to address security concerns. More info [#kubernetes-sigs/kubebuilder#1955](https://github.com/kubernetes-sigs/kubebuilder/pull/1955).
kind: "bugfix"
breaking: false
header: Upgrade the `kube-rbac-proxy` from 0.5.0 to 0.8.0 to solve security concerns
body: >
In the `config/default/manager_auth_proxy_patch.yaml` file, replace `gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0` with `gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0`.
- description: >
For Go-based operators, fix the endpoint names. More info [#kubernetes-sigs/kubebuilder#1910](https://github.com/kubernetes-sigs/kubebuilder/pull/1910).
kind: "bugfix"
breaking: false
header: For Go-based operators, fix the endpoint names
body: >
In the `main.go` file, replace `health` with `healthz` and `ready` with `readyz` then, it would look like:
```go
if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up health check")
os.Exit(1)
}
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up ready check")
os.Exit(1)
}
```
- description: >
For Go-based operators, add `ErrorIfCRDPathMissing` config by default to the `suite_tests.go`. More info [#kubernetes-sigs/kubebuilder#1910](https://github.com/kubernetes-sigs/kubebuilder/pull/1910).
kind: "addition"
breaking: false
header: For Go-based operators, add `ErrorIfCRDPathMissing` config option if please you.
body: >
In the `controllers/<kind>/suite_test.go` file(s), add the option `ErrorIfCRDPathMissing` to raise an issue if the CRDs path be missing which would like:
```go
By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}
```
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ go 1.15
require (
github.com/blang/semver/v4 v4.0.0
github.com/fatih/structtag v1.1.0
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v0.3.0
github.com/gobuffalo/flect v0.2.2
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334
github.com/kr/text v0.1.0
github.com/markbates/inflect v1.0.4
Expand Down Expand Up @@ -34,7 +36,7 @@ require (
rsc.io/letsencrypt v0.0.3 // indirect
sigs.k8s.io/controller-runtime v0.8.0
sigs.k8s.io/controller-tools v0.4.1
sigs.k8s.io/kubebuilder/v2 v2.3.2-0.20201214213149-0a807f4e9428
sigs.k8s.io/kubebuilder/v3 v3.0.0-alpha.0.0.20210129221148-63286cea44ee
sigs.k8s.io/yaml v1.2.0
)

Expand Down
8 changes: 5 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 h1:Hs82Z41s6SdL1CELW+XaDYmOH4hkBN4/N9og/AsOv7E=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
Expand Down Expand Up @@ -1317,6 +1319,7 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down Expand Up @@ -1456,13 +1459,12 @@ sigs.k8s.io/controller-runtime v0.8.0/go.mod h1:v9Lbj5oX443uR7GXYY46E0EE2o7k2YxQ
sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI=
sigs.k8s.io/controller-tools v0.4.1 h1:VkuV0MxlRPmRu5iTgBZU4UxUX2LiR99n3sdQGRxZF4w=
sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU=
sigs.k8s.io/kubebuilder/v2 v2.3.2-0.20201214213149-0a807f4e9428 h1:VUvP/g8pDUdqBHgKPoSX6WA/ZH1Y1+FBOk7khgyTLJw=
sigs.k8s.io/kubebuilder/v2 v2.3.2-0.20201214213149-0a807f4e9428/go.mod h1:J/D/179LBZhQOhRvmMRNbje/Bk+PjbN0/fzUupmO7+U=
sigs.k8s.io/kubebuilder/v3 v3.0.0-alpha.0.0.20210129221148-63286cea44ee h1:SeBBv9UHp5SImBGfoFqAfig/t1+yIBmJgh62czSoJn8=
sigs.k8s.io/kubebuilder/v3 v3.0.0-alpha.0.0.20210129221148-63286cea44ee/go.mod h1:b1WkCy5t/3VSRBCffSfPV1WbH+f45ls69d4ic37sW6w=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
Expand Down
4 changes: 2 additions & 2 deletions hack/generate/samples/generate_testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ package main

import (
"flag"
"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/ansible"
"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/helm"
"os"
"path/filepath"

log "github.com/sirupsen/logrus"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/ansible"
golang "github.com/operator-framework/operator-sdk/hack/generate/samples/internal/go"
"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/helm"
"github.com/operator-framework/operator-sdk/internal/testutils"
)

Expand Down
6 changes: 3 additions & 3 deletions hack/generate/samples/internal/ansible/advanced_molecule.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

log "github.com/sirupsen/logrus"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down Expand Up @@ -145,10 +145,10 @@ func (ma *AdvancedMolecule) updateConfig() {
- patch
- update
- watch
# +kubebuilder:scaffold:rules`
#+kubebuilder:scaffold:rules`
err := testutils.ReplaceInFile(
filepath.Join(ma.ctx.Dir, "config", "rbac", "role.yaml"),
"# +kubebuilder:scaffold:rules",
"#+kubebuilder:scaffold:rules",
cmRolesFragment)
pkg.CheckError("adding customized roles", err)

Expand Down
2 changes: 1 addition & 1 deletion hack/generate/samples/internal/ansible/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,5 +379,5 @@ const rolesForBaseOperator = `
- patch
- update
- watch
# +kubebuilder:scaffold:rules
#+kubebuilder:scaffold:rules
`
2 changes: 1 addition & 1 deletion hack/generate/samples/internal/ansible/memcached.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"

log "github.com/sirupsen/logrus"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down
4 changes: 2 additions & 2 deletions hack/generate/samples/internal/ansible/memcached_molecule.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"path/filepath"
"strings"

kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down Expand Up @@ -81,7 +81,7 @@ func (ma *MoleculeAnsible) Run() {

log.Infof("adding RBAC permissions")
err = testutils.ReplaceInFile(filepath.Join(ma.ctx.Dir, "config", "rbac", "role.yaml"),
"# +kubebuilder:scaffold:rules", rolesForBaseOperator)
"#+kubebuilder:scaffold:rules", rolesForBaseOperator)
pkg.CheckError("replacing in role.yml", err)

log.Infof("adding Memcached mock task to the role with black list")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
playbook: playbooks/reconciliationtest.yml
vars:
meta: '{{ ansible_operator_meta }}'
# +kubebuilder:scaffold:watch
#+kubebuilder:scaffold:watch
11 changes: 5 additions & 6 deletions hack/generate/samples/internal/go/v2/memcached_with_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

log "github.com/sirupsen/logrus"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down Expand Up @@ -59,8 +59,7 @@ func (mh *MemcachedGoWithWebhooks) Prepare() {
func (mh *MemcachedGoWithWebhooks) Run() {
log.Infof("creating the project")
err := mh.ctx.Init(
// TODO(estroz): change this to 3 when stabilized.
"--project-version", "3-alpha",
"--project-version", "3",
"--plugins", "go/v2",
"--repo", "github.com/example/memcached-operator",
"--domain",
Expand Down Expand Up @@ -278,9 +277,9 @@ func GenerateMemcachedGoWithWebhooksSample(samplesPath string) {
}

const rbacFragment = `
// +kubebuilder:rbac:groups=cache.example.com,resources=memcacheds/finalizers,verbs=update
// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;`
//+kubebuilder:rbac:groups=cache.example.com,resources=memcacheds/finalizers,verbs=update
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;`

const reconcileFragment = `// Fetch the Memcached instance
memcached := &cachev1alpha1.Memcached{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"

log "github.com/sirupsen/logrus"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down Expand Up @@ -59,8 +59,7 @@ func (mh *MemcachedGoWithWebhooks) Prepare() {
func (mh *MemcachedGoWithWebhooks) Run() {
log.Infof("creating the project")
err := mh.ctx.Init(
// TODO(estroz): change this to 3 when stabilized.
"--project-version", "3-alpha",
"--project-version", "3",
"--plugins", "go/v3",
"--repo", "github.com/example/memcached-operator",
"--domain",
Expand Down
Loading

0 comments on commit a214328

Please sign in to comment.