Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
adapting health check library to v1beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfoehrKn committed Dec 19, 2019
1 parent cfb6648 commit ed25cac
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
healthcheckconfig "github.com/gardener/gardener-extensions/pkg/controller/healthcheck/config"
"github.com/gardener/gardener-extensions/pkg/controller/healthcheck/general"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -49,8 +49,8 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(certv1alpha1.CertManagementResourceNameSeed): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(certv1alpha1.CertManagementResourceNameShoot): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(certv1alpha1.CertManagementResourceNameSeed): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckManagedResource(certv1alpha1.CertManagementResourceNameShoot): string(gardencorev1beta1.ShootSystemComponentsHealthy),
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
healthcheckconfig "github.com/gardener/gardener-extensions/pkg/controller/healthcheck/config"
"github.com/gardener/gardener-extensions/pkg/controller/healthcheck/general"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand All @@ -44,7 +44,7 @@ func RegisterHealthChecks(mgr manager.Manager) error {
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(dnscontroller.ShootResourcesName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(dnscontroller.SeedResourcesName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(dnscontroller.ShootResourcesName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(dnscontroller.SeedResourcesName): string(gardencorev1beta1.ShootControlPlaneHealthy),
})
}
4 changes: 2 additions & 2 deletions controllers/networking-calico/pkg/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
healthcheckconfig "github.com/gardener/gardener-extensions/pkg/controller/healthcheck/config"
"github.com/gardener/gardener-extensions/pkg/controller/healthcheck/general"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -49,7 +49,7 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(networkcontroller.CalicoConfigSecretName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(networkcontroller.CalicoConfigSecretName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
},
)
}
Expand Down
18 changes: 9 additions & 9 deletions controllers/provider-alicloud/pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
genericworkeractuator "github.com/gardener/gardener-extensions/pkg/controller/worker/genericactuator"
extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -54,11 +54,11 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
normalPredicates,
map[healthcheck.HealthCheck]string{
general.CheckSeedDeployment(alicloud.CsiPluginController): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckSeedDeployment(alicloud.CloudControllerManagerName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(alicloud.CsiPluginController): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckSeedDeployment(alicloud.CloudControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
}); err != nil {
return err
}
Expand All @@ -71,9 +71,9 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(alicloud.MachineControllerManagerName): string(gardencorev1alpha1.ShootEveryNodeReady),
worker.SufficientNodesAvailable(): string(gardencorev1alpha1.ShootEveryNodeReady),
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(alicloud.MachineControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
worker.SufficientNodesAvailable(): string(gardencorev1beta1.ShootEveryNodeReady),
})
}

Expand Down
18 changes: 9 additions & 9 deletions controllers/provider-aws/pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
genericworkeractuator "github.com/gardener/gardener-extensions/pkg/controller/worker/genericactuator"
extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -54,10 +54,10 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
normalPredicates,
map[healthcheck.HealthCheck]string{
general.CheckSeedDeployment(aws.CloudControllerManagerName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(aws.CloudControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
}); err != nil {
return err
}
Expand All @@ -71,7 +71,7 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
exposurePredicate,
map[healthcheck.HealthCheck]string{
general.CheckSeedDeployment(aws.LBReadvertiserDeploymentName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckSeedDeployment(aws.LBReadvertiserDeploymentName): string(gardencorev1beta1.ShootControlPlaneHealthy),
}); err != nil {
return err
}
Expand All @@ -84,9 +84,9 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(aws.MachineControllerManagerName): string(gardencorev1alpha1.ShootEveryNodeReady),
worker.SufficientNodesAvailable(): string(gardencorev1alpha1.ShootEveryNodeReady),
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(aws.MachineControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
worker.SufficientNodesAvailable(): string(gardencorev1beta1.ShootEveryNodeReady),
})
}

Expand Down
16 changes: 8 additions & 8 deletions controllers/provider-azure/pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
genericworkeractuator "github.com/gardener/gardener-extensions/pkg/controller/worker/genericactuator"
extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -54,10 +54,10 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
normalPredicates,
map[healthcheck.HealthCheck]string{
general.CheckSeedDeployment(azure.CloudControllerManagerName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(azure.CloudControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
}); err != nil {
return err
}
Expand All @@ -70,9 +70,9 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(azure.MachineControllerManagerName): string(gardencorev1alpha1.ShootEveryNodeReady),
worker.SufficientNodesAvailable(): string(gardencorev1alpha1.ShootEveryNodeReady),
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(azure.MachineControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
worker.SufficientNodesAvailable(): string(gardencorev1beta1.ShootEveryNodeReady),
})
}

Expand Down
16 changes: 8 additions & 8 deletions controllers/provider-gcp/pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
genericworkeractuator "github.com/gardener/gardener-extensions/pkg/controller/worker/genericactuator"
extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -54,10 +54,10 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
normalPredicates,
map[healthcheck.HealthCheck]string{
general.CheckSeedDeployment(gcp.CloudControllerManagerName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(gcp.CloudControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
}); err != nil {
return err
}
Expand All @@ -70,9 +70,9 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(gcp.MachineControllerManagerName): string(gardencorev1alpha1.ShootEveryNodeReady),
worker.SufficientNodesAvailable(): string(gardencorev1alpha1.ShootEveryNodeReady),
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(gcp.MachineControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
worker.SufficientNodesAvailable(): string(gardencorev1beta1.ShootEveryNodeReady),
})
}

Expand Down
16 changes: 8 additions & 8 deletions controllers/provider-openstack/pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
genericworkeractuator "github.com/gardener/gardener-extensions/pkg/controller/worker/genericactuator"
extensionspredicate "github.com/gardener/gardener-extensions/pkg/predicate"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -54,10 +54,10 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
normalPredicates,
map[healthcheck.HealthCheck]string{
general.CheckSeedDeployment(openstack.CloudControllerManagerName): string(gardencorev1alpha1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(openstack.CloudControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ControlPlaneShootChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.StorageClassesChartResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckManagedResource(genericcontrolplaneactuator.ShootWebhooksResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
}); err != nil {
return err
}
Expand All @@ -70,9 +70,9 @@ func RegisterHealthChecks(mgr manager.Manager, opts healthcheck.DefaultAddArgs)
opts,
nil,
map[healthcheck.HealthCheck]string{
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1alpha1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(openstack.MachineControllerManagerName): string(gardencorev1alpha1.ShootEveryNodeReady),
worker.SufficientNodesAvailable(): string(gardencorev1alpha1.ShootEveryNodeReady),
general.CheckManagedResource(genericworkeractuator.McmShootResourceName): string(gardencorev1beta1.ShootSystemComponentsHealthy),
general.CheckSeedDeployment(openstack.MachineControllerManagerName): string(gardencorev1beta1.ShootControlPlaneHealthy),
worker.SufficientNodesAvailable(): string(gardencorev1beta1.ShootEveryNodeReady),
})
}

Expand Down
Loading

0 comments on commit ed25cac

Please sign in to comment.