Skip to content

Commit

Permalink
Change operator flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kostyukov committed Feb 15, 2022
1 parent 797bf00 commit c8d55c6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion pkg/api/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const FLAG_FALSE string = "false"
var DefaultOperatorFlags OperatorFlags = OperatorFlags{
"aro.alertwebhook.enabled": FLAG_TRUE,

"aro.azuresubnets.enabled": FLAG_TRUE,
"aro.azuresubnets.nsg.enabled": FLAG_TRUE,
"aro.azuresubnets.serviceendpoint.enabled": FLAG_TRUE,

Expand Down
1 change: 0 additions & 1 deletion pkg/operator/controllers/subnets/subnet_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func getValidClusterInstance() *arov1alpha1.Cluster {
ClusterResourceGroupID: clusterResourceGroupId,
InfraID: infraId,
OperatorFlags: arov1alpha1.OperatorFlags{
ENABLED: "true",
NSG_ENABLED: "true",
SERVICE_ENDPOINT_ENABLED: "true",
},
Expand Down
3 changes: 1 addition & 2 deletions pkg/operator/controllers/subnets/subnets_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (

const (
CONFIG_NAMESPACE string = "aro.azuresubnets"
ENABLED string = CONFIG_NAMESPACE + ".enabled"
NSG_ENABLED string = CONFIG_NAMESPACE + "nsg.enabled"
SERVICE_ENDPOINT_ENABLED string = CONFIG_NAMESPACE + "serviceendpoint.enabled"
)
Expand Down Expand Up @@ -73,7 +72,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.
return reconcile.Result{}, err
}

if !instance.Spec.OperatorFlags.GetSimpleBoolean(ENABLED) {
if !instance.Spec.OperatorFlags.GetSimpleBoolean(NSG_ENABLED) && !instance.Spec.OperatorFlags.GetSimpleBoolean(SERVICE_ENDPOINT_ENABLED) {
// controller is disabled
return reconcile.Result{}, nil
}
Expand Down

0 comments on commit c8d55c6

Please sign in to comment.