Skip to content

Commit

Permalink
feat: upgrade kb from 9c02d557f01b-to-b6a0bf1b6040
Browse files Browse the repository at this point in the history
  • Loading branch information
Camila Macedo committed Nov 10, 2020
1 parent d50d944 commit b1f960b
Show file tree
Hide file tree
Showing 127 changed files with 216 additions and 247 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
For Golang based-operators, fix `create api` when only the controller is created.
More info: https://github.com/kubernetes-sigs/kubebuilder/pull/1770
kind: "bugfix"
breaking: false
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
rsc.io/letsencrypt v0.0.3 // indirect
sigs.k8s.io/controller-runtime v0.6.3
sigs.k8s.io/controller-tools v0.3.0
sigs.k8s.io/kubebuilder v1.0.9-0.20201030182622-9c02d557f01b
sigs.k8s.io/kubebuilder/v2 v2.3.2-0.20201109173827-b6a0bf1b6040
sigs.k8s.io/yaml v1.2.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1218,8 +1218,8 @@ sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJ
sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY=
sigs.k8s.io/controller-tools v0.3.0 h1:y3YD99XOyWaXkiF1kd41uRvfp/64teWcrEZFuHxPhJ4=
sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI=
sigs.k8s.io/kubebuilder v1.0.9-0.20201030182622-9c02d557f01b h1:IDxyhHz2vQ5DRRp0azVMPC5rtSWz3ziFDWWnjC+TH5Q=
sigs.k8s.io/kubebuilder v1.0.9-0.20201030182622-9c02d557f01b/go.mod h1:NatUhFMh/ci8gR+qETvZBIlZ4RTQoNa+9uei7okpgcY=
sigs.k8s.io/kubebuilder/v2 v2.3.2-0.20201109173827-b6a0bf1b6040 h1:KnyrRNbDvCTW5PBWI8HzW67Z/04sQHAgS3+3VFYFlBI=
sigs.k8s.io/kubebuilder/v2 v2.3.2-0.20201109173827-b6a0bf1b6040/go.mod h1:J/D/179LBZhQOhRvmMRNbje/Bk+PjbN0/fzUupmO7+U=
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=
Expand Down
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/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down
2 changes: 1 addition & 1 deletion hack/generate/samples/internal/ansible/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/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
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/test/e2e/utils"
kbtestutils "sigs.k8s.io/kubebuilder/v2/test/e2e/utils"

"github.com/operator-framework/operator-sdk/hack/generate/samples/internal/pkg"
"github.com/operator-framework/operator-sdk/internal/testutils"
Expand Down
2 changes: 1 addition & 1 deletion hack/generate/samples/internal/pkg/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"regexp"

log "github.com/sirupsen/logrus"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"

"github.com/operator-framework/operator-sdk/internal/annotations/metrics"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/annotations/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"regexp"
"strings"

"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"

sdkversion "github.com/operator-framework/operator-sdk/internal/version"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/operator-sdk/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"sigs.k8s.io/kubebuilder/pkg/cli"
"sigs.k8s.io/kubebuilder/v2/pkg/cli"
)

var commands = []*cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/operator-sdk/generate/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
"github.com/operator-framework/operator-registry/pkg/lib/bundle"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/yaml"

metricsannotations "github.com/operator-framework/operator-sdk/internal/annotations/metrics"
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/operator-sdk/generate/internal/genutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/apimachinery/pkg/util/validation"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/operator-sdk/generate/kustomize/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"

genutil "github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/generate/internal"
gencsv "github.com/operator-framework/operator-sdk/internal/generate/clusterserviceversion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"

genutil "github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/generate/internal"
gencsv "github.com/operator-framework/operator-sdk/internal/generate/clusterserviceversion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
"github.com/operator-framework/operator-registry/pkg/lib/bundle"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"

metricsannotations "github.com/operator-framework/operator-sdk/internal/annotations/metrics"
"github.com/operator-framework/operator-sdk/internal/generate/clusterserviceversion/bases"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/operator-framework/api/pkg/operators/v1alpha1"
"github.com/operator-framework/operator-registry/pkg/lib/bundle"
appsv1 "k8s.io/api/apps/v1"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/yaml"

metricsannotations "github.com/operator-framework/operator-sdk/internal/annotations/metrics"
Expand Down
2 changes: 1 addition & 1 deletion internal/kubebuilder/cmdutil/cmdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

package cmdutil

import "sigs.k8s.io/kubebuilder/pkg/plugin/scaffold"
import "sigs.k8s.io/kubebuilder/v2/pkg/plugin/scaffold"

// RunOptions represent the types used to implement the different commands
type RunOptions interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/kubebuilder/machinery/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"errors"
"fmt"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

// This file contains the errors returned by the scaffolding machinery
Expand Down
4 changes: 2 additions & 2 deletions internal/kubebuilder/machinery/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"text/template"

"golang.org/x/tools/imports"
"sigs.k8s.io/kubebuilder/pkg/model"
"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"

"github.com/operator-framework/operator-sdk/internal/kubebuilder/filesystem"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/kubebuilder/machinery/scaffold_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega"
"sigs.k8s.io/kubebuilder/pkg/model"
"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"

"github.com/operator-framework/operator-sdk/internal/kubebuilder/filesystem"
)
Expand Down
12 changes: 6 additions & 6 deletions internal/plugins/ansible/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
"strings"

"github.com/spf13/pflag"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/pkg/model/resource"
"sigs.k8s.io/kubebuilder/pkg/plugin"
"sigs.k8s.io/kubebuilder/pkg/plugin/scaffold"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/resource"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin/scaffold"

"github.com/operator-framework/operator-sdk/internal/kubebuilder/cmdutil"
"github.com/operator-framework/operator-sdk/internal/plugins/ansible/v1/scaffolds"
Expand All @@ -45,8 +45,8 @@ type createAPIPlugin struct {
}

var (
_ plugin.CreateAPI = &createAPIPlugin{}
_ cmdutil.RunOptions = &createAPIPlugin{}
_ plugin.CreateAPISubcommand = &createAPIPlugin{}
_ cmdutil.RunOptions = &createAPIPlugin{}
)

// UpdateContext injects documentation for the command
Expand Down
10 changes: 5 additions & 5 deletions internal/plugins/ansible/v1/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/validation"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/pkg/plugin"
"sigs.k8s.io/kubebuilder/pkg/plugin/scaffold"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin/scaffold"

"github.com/operator-framework/operator-sdk/internal/kubebuilder/cmdutil"
"github.com/operator-framework/operator-sdk/internal/plugins/ansible/v1/scaffolds"
Expand All @@ -44,8 +44,8 @@ type initPlugin struct {
}

var (
_ plugin.Init = &initPlugin{}
_ cmdutil.RunOptions = &initPlugin{}
_ plugin.InitSubcommand = &initPlugin{}
_ cmdutil.RunOptions = &initPlugin{}
)

// UpdateContext injects documentation for the command
Expand Down
19 changes: 10 additions & 9 deletions internal/plugins/ansible/v1/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package ansible

import (
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/pkg/plugin"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin"

"github.com/operator-framework/operator-sdk/internal/plugins"
)
Expand All @@ -30,17 +30,18 @@ var (
)

var (
_ plugin.Base = Plugin{}
_ plugin.InitPluginGetter = Plugin{}
_ plugin.Plugin = Plugin{}
_ plugin.Init = Plugin{}
_ plugin.CreateAPI = Plugin{}
)

type Plugin struct {
initPlugin
createAPIPlugin
}

func (Plugin) Name() string { return pluginName }
func (Plugin) Version() plugin.Version { return pluginVersion }
func (Plugin) SupportedProjectVersions() []string { return supportedProjectVersions }
func (p Plugin) GetInitPlugin() plugin.Init { return &p.initPlugin }
func (p Plugin) GetCreateAPIPlugin() plugin.CreateAPI { return &p.createAPIPlugin }
func (Plugin) Name() string { return pluginName }
func (Plugin) Version() plugin.Version { return pluginVersion }
func (Plugin) SupportedProjectVersions() []string { return supportedProjectVersions }
func (p Plugin) GetInitSubcommand() plugin.InitSubcommand { return &p.initPlugin }
func (p Plugin) GetCreateAPISubcommand() plugin.CreateAPISubcommand { return &p.createAPIPlugin }
10 changes: 5 additions & 5 deletions internal/plugins/ansible/v1/scaffolds/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"errors"

"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/kubebuilder/pkg/model"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/pkg/model/resource"
"sigs.k8s.io/kubebuilder/pkg/plugin/scaffold"
"sigs.k8s.io/kubebuilder/v2/pkg/model"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/resource"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin/scaffold"

"github.com/operator-framework/operator-sdk/internal/kubebuilder/machinery"
"github.com/operator-framework/operator-sdk/internal/plugins/ansible/v1/constants"
Expand Down
6 changes: 3 additions & 3 deletions internal/plugins/ansible/v1/scaffolds/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ limitations under the License.
package scaffolds

import (
"sigs.k8s.io/kubebuilder/pkg/model"
"sigs.k8s.io/kubebuilder/pkg/model/config"
"sigs.k8s.io/kubebuilder/pkg/plugin/scaffold"
"sigs.k8s.io/kubebuilder/v2/pkg/model"
"sigs.k8s.io/kubebuilder/v2/pkg/model/config"
"sigs.k8s.io/kubebuilder/v2/pkg/plugin/scaffold"

"github.com/operator-framework/operator-sdk/internal/kubebuilder/machinery"
"github.com/operator-framework/operator-sdk/internal/plugins/ansible/v1/scaffolds/internal/templates"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"path/filepath"

"github.com/kr/text"
"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &CRD{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &Kustomization{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package kdefault
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &AuthProxyPatch{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package kdefault
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &Kustomize{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package manager
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &Kustomization{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package manager
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &Manager{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package prometheus
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &Kustomization{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package prometheus
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &ServiceMonitor{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package rbac
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &ClientClusterRole{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package rbac
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &AuthProxyRole{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package rbac
import (
"path/filepath"

"sigs.k8s.io/kubebuilder/pkg/model/file"
"sigs.k8s.io/kubebuilder/v2/pkg/model/file"
)

var _ file.Template = &AuthProxyRoleBinding{}
Expand Down

0 comments on commit b1f960b

Please sign in to comment.