Skip to content

Commit

Permalink
Remove ControlPlane healthchecks (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
dergeberl authored and Lukas Hoehl committed Apr 11, 2024
1 parent b7fc370 commit ebefeb3
Showing 1 changed file with 2 additions and 38 deletions.
40 changes: 2 additions & 38 deletions pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"context"
"time"

"github.com/gardener/gardener-extension-provider-openstack/pkg/apis/openstack/helper"
"github.com/gardener/gardener-extension-provider-openstack/pkg/openstack"
healthcheckconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck/general"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck/worker"
extensionspredicate "github.com/gardener/gardener/extensions/pkg/predicate"
"github.com/gardener/gardener/extensions/pkg/util"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
Expand All @@ -31,10 +31,6 @@ import (
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/predicate"

"github.com/gardener/gardener-extension-provider-openstack/pkg/apis/openstack/helper"
"github.com/gardener/gardener-extension-provider-openstack/pkg/openstack"
)

var (
Expand All @@ -54,38 +50,6 @@ var (
// RegisterHealthChecks registers health checks for each extension resource
// HealthChecks are grouped by extension (e.g worker), extension.type (e.g aws) and Health Check Type (e.g ShootControlPlaneHealthy)
func RegisterHealthChecks(ctx context.Context, mgr manager.Manager, opts healthcheck.DefaultAddArgs) error {
if err := healthcheck.DefaultRegistration(
ctx,
openstack.Type,
extensionsv1alpha1.SchemeGroupVersion.WithKind(extensionsv1alpha1.ControlPlaneResource),
func() client.ObjectList { return &extensionsv1alpha1.ControlPlaneList{} },
func() extensionsv1alpha1.Object { return &extensionsv1alpha1.ControlPlane{} },
mgr,
opts,
[]predicate.Predicate{extensionspredicate.HasPurpose(extensionsv1alpha1.Normal)},
[]healthcheck.ConditionTypeToHealthCheck{
{
ConditionType: string(gardencorev1beta1.ShootControlPlaneHealthy),
HealthCheck: general.NewSeedDeploymentHealthChecker(openstack.CloudControllerManagerName),
},
{
ConditionType: string(gardencorev1beta1.ShootControlPlaneHealthy),
HealthCheck: general.NewSeedDeploymentHealthChecker(openstack.CSIControllerName),
},
{
ConditionType: string(gardencorev1beta1.ShootControlPlaneHealthy),
HealthCheck: general.NewSeedDeploymentHealthChecker(openstack.CSISnapshotControllerName),
},
{
ConditionType: string(gardencorev1beta1.ShootControlPlaneHealthy),
HealthCheck: general.NewSeedDeploymentHealthChecker(openstack.CSISnapshotValidationName),
},
},
sets.New[gardencorev1beta1.ConditionType](),
); err != nil {
return err
}

return healthcheck.DefaultRegistration(
ctx,
openstack.Type,
Expand Down

0 comments on commit ebefeb3

Please sign in to comment.