@@ -35,9 +35,9 @@ import (
35
35
"sigs.k8s.io/controller-runtime/pkg/client"
36
36
37
37
"github.com/validator-labs/validator-plugin-azure/api/v1alpha1"
38
- "github.com/validator-labs/validator-plugin-azure/internal/constants "
39
- azure_utils "github.com/validator-labs/validator-plugin-azure/internal/utils/azure "
40
- "github.com/validator-labs/validator-plugin-azure/internal/validators "
38
+ "github.com/validator-labs/validator-plugin-azure/pkg/azure "
39
+ "github.com/validator-labs/validator-plugin-azure/pkg/constants "
40
+ utils "github.com/validator-labs/validator-plugin-azure/pkg/utils/azure "
41
41
vapi "github.com/validator-labs/validator/api/v1alpha1"
42
42
"github.com/validator-labs/validator/pkg/types"
43
43
"github.com/validator-labs/validator/pkg/util"
@@ -114,24 +114,24 @@ func (r *AzureValidatorReconciler) Reconcile(ctx context.Context, req ctrl.Reque
114
114
ValidationRuleErrors : make ([]error , 0 , vr .Spec .ExpectedResults ),
115
115
}
116
116
117
- azureAPI , err := azure_utils .NewAzureAPI ()
117
+ azureAPI , err := utils .NewAzureAPI ()
118
118
if err != nil {
119
119
l .Error (err , "failed to create Azure API object" )
120
120
} else {
121
121
azureCtx := context .WithoutCancel (ctx )
122
122
if os .Getenv ("IS_TEST" ) == "true" {
123
123
var cancel context.CancelFunc
124
- azureCtx , cancel = context .WithDeadline (ctx , time .Now ().Add (azure_utils .TestClientTimeout ))
124
+ azureCtx , cancel = context .WithDeadline (ctx , time .Now ().Add (utils .TestClientTimeout ))
125
125
defer cancel ()
126
126
}
127
127
128
- daClient := azure_utils .NewDenyAssignmentsClient (azureCtx , azureAPI .DenyAssignmentsClient )
129
- raClient := azure_utils .NewRoleAssignmentsClient (azureCtx , azureAPI .RoleAssignmentsClient )
130
- rdClient := azure_utils .NewRoleDefinitionsClient (azureCtx , azureAPI .RoleDefinitionsClient )
131
- cgiClient := azure_utils .NewCommunityGalleryImagesClient (azureCtx , azureAPI .CommunityGalleryImagesClientProducer )
128
+ daClient := utils .NewDenyAssignmentsClient (azureCtx , azureAPI .DenyAssignmentsClient )
129
+ raClient := utils .NewRoleAssignmentsClient (azureCtx , azureAPI .RoleAssignmentsClient )
130
+ rdClient := utils .NewRoleDefinitionsClient (azureCtx , azureAPI .RoleDefinitionsClient )
131
+ cgiClient := utils .NewCommunityGalleryImagesClient (azureCtx , azureAPI .CommunityGalleryImagesClientProducer )
132
132
133
133
// RBAC rules
134
- rbacSvc := validators .NewRBACRuleService (daClient , raClient , rdClient )
134
+ rbacSvc := azure .NewRBACRuleService (daClient , raClient , rdClient )
135
135
for _ , rule := range validator .Spec .RBACRules {
136
136
vrr , err := rbacSvc .ReconcileRBACRule (rule )
137
137
if err != nil {
@@ -141,7 +141,7 @@ func (r *AzureValidatorReconciler) Reconcile(ctx context.Context, req ctrl.Reque
141
141
}
142
142
143
143
// Community gallery image rules
144
- cgiSvc := validators .NewCommunityGalleryImageRuleService (cgiClient , r .Log )
144
+ cgiSvc := azure .NewCommunityGalleryImageRuleService (cgiClient , r .Log )
145
145
for _ , rule := range validator .Spec .CommunityGalleryImageRules {
146
146
vrr , err := cgiSvc .ReconcileCommunityGalleryImageRule (rule )
147
147
if err != nil {
0 commit comments