Skip to content

Commit

Permalink
feature: disable systemreserved when autosizednodes enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Kotas <[email protected]>
  • Loading branch information
petrkotas committed Mar 16, 2022
1 parent 61a18d2 commit 02d429a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/operator/controllers/workaround/systemreserved.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime"

arov1alpha1 "github.com/Azure/ARO-RP/pkg/operator/apis/aro.openshift.io/v1alpha1"
"github.com/Azure/ARO-RP/pkg/operator/controllers/autosizednodes"
"github.com/Azure/ARO-RP/pkg/util/dynamichelper"
"github.com/Azure/ARO-RP/pkg/util/version"
)
Expand Down Expand Up @@ -47,6 +48,9 @@ func (sr *systemreserved) Name() string {
}

func (sr *systemreserved) IsRequired(clusterVersion *version.Version, cluster *arov1alpha1.Cluster) bool {
if cluster.Spec.OperatorFlags.GetSimpleBoolean(autosizednodes.ControllerEnabled) {
return false
}
return clusterVersion.Lt(sr.versionFixed)
}

Expand Down

0 comments on commit 02d429a

Please sign in to comment.