-
Notifications
You must be signed in to change notification settings - Fork 70
/
zz_authorization_setup.go
executable file
·46 lines (41 loc) · 2.15 KB
/
zz_authorization_setup.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
package controller
import (
ctrl "sigs.k8s.io/controller-runtime"
"github.com/crossplane/upjet/pkg/controller"
managementlock "github.com/upbound/provider-azure/internal/controller/authorization/managementlock"
pimactiveroleassignment "github.com/upbound/provider-azure/internal/controller/authorization/pimactiveroleassignment"
pimeligibleroleassignment "github.com/upbound/provider-azure/internal/controller/authorization/pimeligibleroleassignment"
policydefinition "github.com/upbound/provider-azure/internal/controller/authorization/policydefinition"
resourcegrouppolicyassignment "github.com/upbound/provider-azure/internal/controller/authorization/resourcegrouppolicyassignment"
resourcepolicyassignment "github.com/upbound/provider-azure/internal/controller/authorization/resourcepolicyassignment"
resourcepolicyexemption "github.com/upbound/provider-azure/internal/controller/authorization/resourcepolicyexemption"
roleassignment "github.com/upbound/provider-azure/internal/controller/authorization/roleassignment"
roledefinition "github.com/upbound/provider-azure/internal/controller/authorization/roledefinition"
subscriptionpolicyassignment "github.com/upbound/provider-azure/internal/controller/authorization/subscriptionpolicyassignment"
subscriptionpolicyexemption "github.com/upbound/provider-azure/internal/controller/authorization/subscriptionpolicyexemption"
)
// Setup_authorization creates all controllers with the supplied logger and adds them to
// the supplied manager.
func Setup_authorization(mgr ctrl.Manager, o controller.Options) error {
for _, setup := range []func(ctrl.Manager, controller.Options) error{
managementlock.Setup,
pimactiveroleassignment.Setup,
pimeligibleroleassignment.Setup,
policydefinition.Setup,
resourcegrouppolicyassignment.Setup,
resourcepolicyassignment.Setup,
resourcepolicyexemption.Setup,
roleassignment.Setup,
roledefinition.Setup,
subscriptionpolicyassignment.Setup,
subscriptionpolicyexemption.Setup,
} {
if err := setup(mgr, o); err != nil {
return err
}
}
return nil
}