Skip to content

Commit

Permalink
Merge pull request #1827 from MisterMX/refactor/setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterMX authored Aug 28, 2023
2 parents bdf4b5f + 8222beb commit 8585099
Show file tree
Hide file tree
Showing 91 changed files with 2,175 additions and 385 deletions.
33 changes: 33 additions & 0 deletions pkg/controller/acm/setup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Copyright 2023 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package acm

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/crossplane-runtime/pkg/controller"

"github.com/crossplane-contrib/provider-aws/pkg/utils/setup"
)

// Setup acm controllers.
func Setup(mgr ctrl.Manager, o controller.Options) error {
return setup.SetupControllers(
mgr, o,
SetupCertificate,
)
}
36 changes: 36 additions & 0 deletions pkg/controller/acmpca/setup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Copyright 2023 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package acmpca

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/crossplane-runtime/pkg/controller"

"github.com/crossplane-contrib/provider-aws/pkg/controller/acmpca/certificateauthority"
"github.com/crossplane-contrib/provider-aws/pkg/controller/acmpca/certificateauthoritypermission"
"github.com/crossplane-contrib/provider-aws/pkg/utils/setup"
)

// Setup acm controllers.
func Setup(mgr ctrl.Manager, o controller.Options) error {
return setup.SetupControllers(
mgr, o,
certificateauthority.SetupCertificateAuthority,
certificateauthoritypermission.SetupCertificateAuthorityPermission,
)
}
38 changes: 38 additions & 0 deletions pkg/controller/apigateway/setup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2023 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package apigateway

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/crossplane-runtime/pkg/controller"

"github.com/crossplane-contrib/provider-aws/pkg/controller/apigateway/method"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigateway/resource"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigateway/restapi"
"github.com/crossplane-contrib/provider-aws/pkg/utils/setup"
)

// Setup apigateway controllers.
func Setup(mgr ctrl.Manager, o controller.Options) error {
return setup.SetupControllers(
mgr, o,
method.SetupMethod,
resource.SetupResource,
restapi.SetupRestAPI,
)
}
56 changes: 56 additions & 0 deletions pkg/controller/apigatewayv2/setup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
Copyright 2023 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package apigatewayv2

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/crossplane-runtime/pkg/controller"

"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/api"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/apimapping"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/authorizer"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/deployment"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/domainname"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/integration"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/integrationresponse"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/model"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/route"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/routeresponse"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/stage"
"github.com/crossplane-contrib/provider-aws/pkg/controller/apigatewayv2/vpclink"
"github.com/crossplane-contrib/provider-aws/pkg/utils/setup"
)

// Setup apigatewayv2 controllers.
func Setup(mgr ctrl.Manager, o controller.Options) error {
return setup.SetupControllers(
mgr, o,
api.SetupAPI,
apimapping.SetupAPIMapping,
authorizer.SetupAuthorizer,
deployment.SetupDeployment,
domainname.SetupDomainName,
integration.SetupIntegration,
integrationresponse.SetupIntegrationResponse,
model.SetupModel,
route.SetupRoute,
routeresponse.SetupRouteResponse,
stage.SetupStage,
vpclink.SetupVPCLink,
)
}
34 changes: 34 additions & 0 deletions pkg/controller/athena/setup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Copyright 2023 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package athena

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/crossplane-runtime/pkg/controller"

"github.com/crossplane-contrib/provider-aws/pkg/controller/athena/workgroup"
"github.com/crossplane-contrib/provider-aws/pkg/utils/setup"
)

// Setup athena controllers.
func Setup(mgr ctrl.Manager, o controller.Options) error {
return setup.SetupControllers(
mgr, o,
workgroup.SetupWorkGroup,
)
}
34 changes: 34 additions & 0 deletions pkg/controller/autoscaling/setup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Copyright 2023 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package autoscaling

import (
ctrl "sigs.k8s.io/controller-runtime"

"github.com/crossplane/crossplane-runtime/pkg/controller"

"github.com/crossplane-contrib/provider-aws/pkg/controller/autoscaling/autoscalinggroup"
"github.com/crossplane-contrib/provider-aws/pkg/utils/setup"
)

// Setup autoscaling controllers.
func Setup(mgr ctrl.Manager, o controller.Options) error {
return setup.SetupControllers(
mgr, o,
autoscalinggroup.SetupAutoScalingGroup,
)
}
Loading

0 comments on commit 8585099

Please sign in to comment.