Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions pkg/model/resource/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ func APIPackagePath(repo, group, version string, multiGroup bool) string {
return path.Join(repo, "api", version)
}

// APIPackagePathLegacy returns the default path
func APIPackagePathLegacy(repo, group, version string, multiGroup bool) string {
if multiGroup {
if group != "" {
return path.Join(repo, "apis", group, version)
}
return path.Join(repo, "apis", version)
}
return path.Join(repo, "api", version)
}

// RegularPlural returns a default plural form when none was specified
func RegularPlural(singular string) string {
return flect.Pluralize(strings.ToLower(singular))
Expand Down
17 changes: 0 additions & 17 deletions pkg/model/resource/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,6 @@ var _ = Describe("APIPackagePath", func() {
)
})

var _ = Describe("APIPackagePathLegacy", func() {
const (
repo = "github.com/kubernetes-sigs/kubebuilder"
group = "group"
version = "v1"
)

DescribeTable("should work",
func(repo, group, version string, multiGroup bool, p string) {
Expect(APIPackagePathLegacy(repo, group, version, multiGroup)).To(Equal(p))
},
Entry("single group setup", repo, group, version, false, path.Join(repo, "api", version)),
Entry("multiple group setup", repo, group, version, true, path.Join(repo, "apis", group, version)),
Entry("multiple group setup with empty group", repo, "", version, true, path.Join(repo, "apis", version)),
)
})

var _ = DescribeTable("RegularPlural should return the regular plural form",
func(singular, plural string) { Expect(RegularPlural(singular)).To(Equal(plural)) },
Entry("basic singular", "firstmate", "firstmates"),
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/utils/test_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ func (t *TestContext) makePrometheusOperatorURL() string {
return fmt.Sprintf(prometheusOperatorURL, prometheusOperatorVersion)
}

// InstallCertManager installs the cert manager bundle. If hasv1beta1CRs is true,
// the legacy version (which uses v1alpha2 CRs) is installed.
// InstallCertManager installs the cert manager bundle.
func (t *TestContext) InstallCertManager() error {
url := t.makeCertManagerURL()
if _, err := t.Kubectl.Apply(false, "-f", url, "--validate=false"); err != nil {
Expand Down
Loading