Skip to content

Commit

Permalink
adjustments for gardener/gardener v1.111.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Jan 24, 2025
1 parent fa97af1 commit 8ac64a5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
monitoringv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
componentbaseconfig "k8s.io/component-base/config"
componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1"
"k8s.io/component-base/version/verflag"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand Down Expand Up @@ -55,7 +55,7 @@ func NewServiceControllerCommand() *cobra.Command {

func (o *Options) run(ctx context.Context) error {
// TODO: Make these flags configurable via command line parameters or component config file.
util.ApplyClientConnectionConfigurationToRESTConfig(&componentbaseconfig.ClientConnectionConfiguration{
util.ApplyClientConnectionConfigurationToRESTConfig(&componentbaseconfigv1alpha1.ClientConnectionConfiguration{
QPS: 100.0,
Burst: 130,
}, o.restOptions.Completed().Config)
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package config

import (
healthcheckconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
healthcheckconfigv1alpha1 "github.com/gardener/gardener/extensions/pkg/apis/config/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -19,7 +19,7 @@ type Configuration struct {
NetworkProblemDetector *NetworkProblemDetector

// HealthCheckConfig is the config for the health check controller.
HealthCheckConfig *healthcheckconfig.HealthCheckConfig
HealthCheckConfig *healthcheckconfigv1alpha1.HealthCheckConfig
}

// NetworkProblemDetector contains the configuration for the network problem detector.
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/config/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/apis/config/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"errors"
"os"

healthcheckconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
healthcheckconfigv1alpha1 "github.com/gardener/gardener/extensions/pkg/apis/config/v1alpha1"
"github.com/gardener/gardener/extensions/pkg/controller/cmd"
extensionshealthcheckcontroller "github.com/gardener/gardener/extensions/pkg/controller/healthcheck"
extensionsheartbeatcontroller "github.com/gardener/gardener/extensions/pkg/controller/heartbeat"
Expand Down Expand Up @@ -87,7 +87,7 @@ func (c *NetworkProblemDetectorConfig) Apply(config *controllerconfig.Config) {
}

// ApplyHealthCheckConfig applies the HealthCheckConfig to the config.
func (c *NetworkProblemDetectorConfig) ApplyHealthCheckConfig(config *healthcheckconfig.HealthCheckConfig) {
func (c *NetworkProblemDetectorConfig) ApplyHealthCheckConfig(config *healthcheckconfigv1alpha1.HealthCheckConfig) {
if c.config.HealthCheckConfig != nil {
*config = *c.config.HealthCheckConfig
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/controller/healthcheck/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"context"
"time"

healthcheckconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
healthcheckconfigv1alpha1 "github.com/gardener/gardener/extensions/pkg/apis/config/v1alpha1"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck/general"
gardencorev1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1"
Expand All @@ -25,15 +25,14 @@ var (
defaultSyncPeriod = time.Second * 30
// DefaultAddOptions contains configuration for the health check controller.
DefaultAddOptions = healthcheck.DefaultAddArgs{
HealthCheckConfig: healthcheckconfig.HealthCheckConfig{SyncPeriod: metav1.Duration{Duration: defaultSyncPeriod}},
HealthCheckConfig: healthcheckconfigv1alpha1.HealthCheckConfig{SyncPeriod: metav1.Duration{Duration: defaultSyncPeriod}},
}
)

// 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 SystemComponentsHealthy)
func RegisterHealthChecks(ctx context.Context, mgr manager.Manager, opts healthcheck.DefaultAddArgs) error {
return healthcheck.DefaultRegistration(
ctx,
constants.ExtensionType,
extensionsv1alpha1.SchemeGroupVersion.WithKind(extensionsv1alpha1.ExtensionResource),
func() client.ObjectList { return &extensionsv1alpha1.ExtensionList{} },
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/lifecycle/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type AddOptions struct {

// AddToManager adds a Networking Policy Filter Lifecycle controller to the given Controller Manager.
func AddToManager(ctx context.Context, mgr manager.Manager) error {
return extension.Add(ctx, mgr, extension.AddArgs{
return extension.Add(mgr, extension.AddArgs{
Actuator: NewActuator(mgr, DefaultAddOptions.ServiceConfig.Configuration),
ControllerOptions: DefaultAddOptions.ControllerOptions,
Name: Name,
Expand Down

0 comments on commit 8ac64a5

Please sign in to comment.