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 797acb1 commit 74802cb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmd/gardener-extension-shoot-cert-service/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/gardener/gardener/extensions/pkg/util"
"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 (
apisconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
apisconfigv1alpha1 "github.com/gardener/gardener/extensions/pkg/apis/config/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -26,7 +26,7 @@ type Configuration struct {
// ACME contains ACME related configuration.
ACME ACME
// HealthCheckConfig is the config for the health check controller.
HealthCheckConfig *apisconfig.HealthCheckConfig
HealthCheckConfig *apisconfigv1alpha1.HealthCheckConfig
// PrivateKeyDefaults default algorithm and sizes for certificate private keys.
PrivateKeyDefaults *PrivateKeyDefaults
}
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"

extensionsapisconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
extensionsapisconfigv1alpha1 "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 @@ -100,7 +100,7 @@ func ControllerSwitches() *cmd.SwitchOptions {
)
}

func (c *CertificateServiceConfig) ApplyHealthCheckConfig(config *extensionsapisconfig.HealthCheckConfig) {
func (c *CertificateServiceConfig) ApplyHealthCheckConfig(config *extensionsapisconfigv1alpha1.HealthCheckConfig) {
if c.config.HealthCheckConfig != nil {
*config = *c.config.HealthCheckConfig
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func AddToManager(ctx context.Context, mgr manager.Manager) error {
// AddToManagerWithOptions adds a controller with the given Options to the given manager.
// The opts.Reconciler is being set with a newly instantiated actuator.
func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddOptions) error {
return extension.Add(ctx, mgr, extension.AddArgs{
return extension.Add(mgr, extension.AddArgs{
Actuator: NewActuator(mgr, opts.ServiceConfig.Configuration),
ControllerOptions: opts.ControllerOptions,
Name: ControllerName,
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"

apisconfig "github.com/gardener/gardener/extensions/pkg/apis/config"
apisconfigv1alpha1 "github.com/gardener/gardener/extensions/pkg/apis/config/v1alpha1"
extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck"
"github.com/gardener/gardener/extensions/pkg/controller/healthcheck/general"
Expand All @@ -27,7 +27,7 @@ var (
defaultSyncPeriod = time.Second * 30
// DefaultAddOptions are the default DefaultAddArgs for AddToManager.
DefaultAddOptions = healthcheck.DefaultAddArgs{
HealthCheckConfig: apisconfig.HealthCheckConfig{SyncPeriod: metav1.Duration{Duration: defaultSyncPeriod}},
HealthCheckConfig: apisconfigv1alpha1.HealthCheckConfig{SyncPeriod: metav1.Duration{Duration: defaultSyncPeriod}},
}
)

Expand All @@ -39,7 +39,6 @@ func RegisterHealthChecks(ctx context.Context, mgr manager.Manager, opts healthc
}

return healthcheck.DefaultRegistration(
ctx,
certcontroller.Type,
extensionsv1alpha1.SchemeGroupVersion.WithKind(extensionsv1alpha1.ExtensionResource),
func() client.ObjectList { return &extensionsv1alpha1.ExtensionList{} },
Expand Down

0 comments on commit 74802cb

Please sign in to comment.