Skip to content

Commit

Permalink
Fix API group in autogeneration (#3588)
Browse files Browse the repository at this point in the history
* Fix group in PROJECT

* Fix group in PROJECT
  • Loading branch information
caseydavenport authored Nov 5, 2024
1 parent 60583a0 commit 9c90d3a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
42 changes: 21 additions & 21 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,39 @@ resources:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: Installation
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: APIServer
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: Monitor
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: LogCollector
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: TigeraStatus
path: github.com/tigera/operator/api/v1
version: v1
Expand All @@ -56,125 +56,125 @@ resources:
namespaced: true
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: EgressGateway
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: ImageSet
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: IntrusionDetection
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: PacketCaptureAPI
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: LogStorage
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: Authentication
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: ManagementCluster
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: ApplicationLayer
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: Manager
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
namespaced: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: Tenant
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: ManagementClusterConnection
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: NonClusterHost
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: PolicyRecommendation
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
controller: true
domain: tigera.io
group: operator
group: operator.tigera.io
kind: Compliance
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
domain: tigera.io
group: operator
group: operator.tigera.io
kind: TLSTerminatedRoute
path: github.com/tigera/operator/api/v1
version: v1
- api:
crdVersion: v1
domain: tigera.io
group: operator
group: operator.tigera.io
kind: TLSPassthroughRoute
path: github.com/tigera/operator/api/v1
version: v1
Expand Down
14 changes: 7 additions & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (

v3 "github.com/tigera/api/pkg/apis/projectcalico/v3"

operatorv1 "github.com/tigera/operator/api/v1"
v1 "github.com/tigera/operator/api/v1"
"github.com/tigera/operator/internal/controller"
"github.com/tigera/operator/pkg/active"
Expand All @@ -46,6 +45,7 @@ import (
"github.com/tigera/operator/pkg/render/logstorage/eck"
"github.com/tigera/operator/version"

operatortigeraiov1 "github.com/tigera/operator/api/v1"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -80,7 +80,7 @@ func init() {
// +kubebuilder:scaffold:scheme
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(apiextensions.AddToScheme(scheme))
utilruntime.Must(operatorv1.AddToScheme(scheme))
utilruntime.Must(operatortigeraiov1.AddToScheme(scheme))
utilruntime.Must(apis.AddToScheme(scheme))
}

Expand Down Expand Up @@ -159,15 +159,15 @@ func main() {
os.Exit(0)
}
if printCalicoCRDs != "" {
if err := showCRDs(operatorv1.Calico, printCalicoCRDs); err != nil {
if err := showCRDs(operatortigeraiov1.Calico, printCalicoCRDs); err != nil {
fmt.Println(err)
os.Exit(1)
}
os.Exit(0)
}

if printEnterpriseCRDs != "" {
if err := showCRDs(operatorv1.TigeraSecureEnterprise, printEnterpriseCRDs); err != nil {
if err := showCRDs(operatortigeraiov1.TigeraSecureEnterprise, printEnterpriseCRDs); err != nil {
fmt.Println(err)
os.Exit(1)
}
Expand Down Expand Up @@ -488,7 +488,7 @@ func metricsAddr() string {
return fmt.Sprintf("%s:%s", metricsHost, metricsPort)
}

func showCRDs(variant operatorv1.ProductVariant, outputType string) error {
func showCRDs(variant operatortigeraiov1.ProductVariant, outputType string) error {
first := true
for _, v := range crds.GetCRDs(variant) {
if outputType != "all" {
Expand Down Expand Up @@ -521,9 +521,9 @@ func executePreDeleteHook(ctx context.Context, c client.Client) error {

// Clean up any custom-resources first - this will trigger teardown of pods deloyed
// by the operator, and give the operator a chance to clean up gracefully.
installation := &operatorv1.Installation{}
installation := &operatortigeraiov1.Installation{}
installation.Name = utils.DefaultInstanceKey.Name
apiserver := &operatorv1.APIServer{}
apiserver := &operatortigeraiov1.APIServer{}
apiserver.Name = utils.DefaultInstanceKey.Name
for _, o := range []client.Object{installation, apiserver} {
if err := c.Delete(ctx, o); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

operatorv1 "github.com/tigera/operator/api/v1"
operatortigeraiov1 "github.com/tigera/operator/api/v1"
//+kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -74,7 +74,7 @@ var _ = BeforeSuite(func() {
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

err = operatorv1.AddToScheme(scheme.Scheme)
err = operatortigeraiov1.AddToScheme(scheme.Scheme)
Expect(err).NotTo(HaveOccurred())

//+kubebuilder:scaffold:scheme
Expand Down

0 comments on commit 9c90d3a

Please sign in to comment.