Skip to content

Commit

Permalink
Remove controller/config (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostov6 authored Dec 10, 2024
1 parent bfe2cf6 commit 96f7131
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/rsyslogrelp/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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.
Expand Down
14 changes: 0 additions & 14 deletions pkg/controller/config/config.go

This file was deleted.

6 changes: 3 additions & 3 deletions pkg/controller/lifecycle/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
}
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ build:
- pkg/cmd/rsyslogrelp
- pkg/component/rsyslogrelpconfigcleaner
- pkg/constants
- pkg/controller/config
- pkg/controller/lifecycle
- imagevector
- imagevector/images.yaml
Expand Down

0 comments on commit 96f7131

Please sign in to comment.