зеркало из https://github.com/Azure/ARO-RP.git
Merge pull request #2207 from s-amann/feature/enable-mhc-by-default
feature: enable mhc by default
This commit is contained in:
Коммит
6be0cd14df
|
@ -68,8 +68,8 @@ func DefaultOperatorFlags() OperatorFlags {
|
|||
"aro.imageconfig.enabled": flagTrue,
|
||||
"aro.machine.enabled": flagTrue,
|
||||
"aro.machineset.enabled": flagTrue,
|
||||
"aro.machinehealthcheck.enabled": flagFalse,
|
||||
"aro.machinehealthcheck.managed": flagFalse,
|
||||
"aro.machinehealthcheck.enabled": flagTrue,
|
||||
"aro.machinehealthcheck.managed": flagTrue,
|
||||
"aro.monitoring.enabled": flagTrue,
|
||||
"aro.nodedrainer.enabled": flagTrue,
|
||||
"aro.pullsecret.enabled": flagTrue,
|
||||
|
|
|
@ -7,7 +7,7 @@ package machinehealthcheck
|
|||
|
||||
The controller in this package aims to ensure the ARO MachineHealthCheck CR and MHC Remediation Alert
|
||||
exist and are correctly configured to automatically mitigate non-ready worker nodes and create an in-cluster alert
|
||||
when remediation is occuring frequently.
|
||||
when remediation is occurring frequently.
|
||||
|
||||
There are two flags which control the operations performed by the controller:
|
||||
|
||||
|
|
|
@ -5,8 +5,10 @@ package e2e
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -395,3 +397,25 @@ var _ = Describe("ARO Operator - MUO Deployment", func() {
|
|||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
||||
var _ = Describe("ARO Operator - MHC Deployment", func() {
|
||||
Specify("MHC should be enabled and managed by default", func() {
|
||||
mhcIsDeployed := func() (bool, error) {
|
||||
co, err := clients.AROClusters.AroV1alpha1().Clusters().Get(context.Background(), "cluster", metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
mhcEnabled, _ := strconv.ParseBool(co.Spec.OperatorFlags.GetWithDefault("aro.machinehealthcheck.enabled", "false"))
|
||||
mhcManaged, _ := strconv.ParseBool(co.Spec.OperatorFlags.GetWithDefault("aro.machinehealthcheck.managed", "false"))
|
||||
|
||||
if mhcEnabled && mhcManaged {
|
||||
return true, nil
|
||||
}
|
||||
return false, errors.New("mhc should be enabled and managed by default")
|
||||
}
|
||||
|
||||
err := wait.PollImmediate(30*time.Second, 10*time.Minute, mhcIsDeployed)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче