diff --git a/pkg/cmd/rsyslogrelp/options.go b/pkg/cmd/rsyslogrelp/options.go index a9da3753..82be108c 100644 --- a/pkg/cmd/rsyslogrelp/options.go +++ b/pkg/cmd/rsyslogrelp/options.go @@ -16,9 +16,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/apis/config" apisconfig "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/apis/config" "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/apis/config/v1alpha1" - controllerconfig "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/controller/config" "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/controller/lifecycle" oscwebhook "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/webhook/operatingsystemconfig" ) @@ -82,8 +82,8 @@ type RsyslogRelpServiceConfig struct { } // Apply applies the Options to the passed ControllerOptions instance. -func (c *RsyslogRelpServiceConfig) Apply(config *controllerconfig.Config) { - config.Configuration = c.config +func (c *RsyslogRelpServiceConfig) Apply(config *config.Configuration) { + *config = c.config } // ControllerSwitches are the cmd.ControllerSwitches for the extension controllers. diff --git a/pkg/controller/config/config.go b/pkg/controller/config/config.go deleted file mode 100644 index ac83e839..00000000 --- a/pkg/controller/config/config.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors -// -// SPDX-License-Identifier: Apache-2.0 - -package config - -import ( - "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/apis/config" -) - -// Config contains configuration for the shoot rsyslog relp extension. -type Config struct { - config.Configuration -} diff --git a/pkg/controller/lifecycle/add.go b/pkg/controller/lifecycle/add.go index 126f8f18..86342d5c 100644 --- a/pkg/controller/lifecycle/add.go +++ b/pkg/controller/lifecycle/add.go @@ -15,8 +15,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/manager" + "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/apis/config" "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/constants" - controllerconfig "github.com/gardener/gardener-extension-shoot-rsyslog-relp/pkg/controller/config" ) const ( @@ -36,7 +36,7 @@ type AddOptions struct { // ControllerOptions contains options for the controller. ControllerOptions controller.Options // Config contains configuration for the shoot rsyslog-relp controller. - Config controllerconfig.Config + Config config.Configuration // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. IgnoreOperationAnnotation bool } @@ -46,7 +46,7 @@ func AddToManager(ctx context.Context, mgr manager.Manager) error { decoder := serializer.NewCodecFactory(mgr.GetScheme(), serializer.EnableStrict).UniversalDecoder() return extension.Add(ctx, mgr, extension.AddArgs{ - Actuator: NewActuator(mgr.GetClient(), decoder, DefaultAddOptions.Config.Configuration, extensioncontroller.ChartRendererFactoryFunc(util.NewChartRendererForShoot)), + Actuator: NewActuator(mgr.GetClient(), decoder, DefaultAddOptions.Config, extensioncontroller.ChartRendererFactoryFunc(util.NewChartRendererForShoot)), ControllerOptions: DefaultAddOptions.ControllerOptions, Name: Name, FinalizerSuffix: FinalizerSuffix, diff --git a/skaffold.yaml b/skaffold.yaml index ccf8771e..3ee9f910 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -57,7 +57,6 @@ build: - pkg/cmd/rsyslogrelp - pkg/component/rsyslogrelpconfigcleaner - pkg/constants - - pkg/controller/config - pkg/controller/lifecycle - imagevector - imagevector/images.yaml