-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Setup function per api group
Signed-off-by: Maximilian Blatt (external expert on behalf of DB Netz) <[email protected]>
- Loading branch information
Showing
92 changed files
with
2,176 additions
and
386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) | ||
} |
Oops, something went wrong.