Skip to content

Commit

Permalink
clientca-configmap: Remove OperatorNamespace field
Browse files Browse the repository at this point in the history
* pkg/operator/controller/clientca-configmap/controller.go (Config):
* pkg/operator/controller/clientca-configmap/controller_test.go (Test_Reconcile):
* pkg/operator/operator.go (New): Remove unused OperatorNamespace field.
  • Loading branch information
Miciah committed Oct 19, 2023
1 parent b3ea675 commit 3a3fb20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions pkg/operator/controller/clientca-configmap/controller.go
Expand Up @@ -165,9 +165,8 @@ func New(mgr manager.Manager, config Config) (controller.Controller, error) {

// Config holds all the things necessary for the controller to run.
type Config struct {
OperatorNamespace string
SourceNamespace string
TargetNamespace string
SourceNamespace string
TargetNamespace string
}

type reconciler struct {
Expand Down
5 changes: 2 additions & 3 deletions pkg/operator/controller/clientca-configmap/controller_test.go
Expand Up @@ -245,9 +245,8 @@ func Test_Reconcile(t *testing.T) {
reconciler := &reconciler{
client: cl,
config: Config{
OperatorNamespace: "openshift-ingress-operator",
SourceNamespace: "openshift-config",
TargetNamespace: "openshift-ingress",
SourceNamespace: "openshift-config",
TargetNamespace: "openshift-ingress",
},
}
req := reconcile.Request{
Expand Down
5 changes: 2 additions & 3 deletions pkg/operator/operator.go
Expand Up @@ -224,9 +224,8 @@ func New(config operatorconfig.Config, kubeConfig *rest.Config) (*Operator, erro

// Set up the client CA configmap controller
if _, err := clientcacontroller.New(mgr, clientcacontroller.Config{
OperatorNamespace: config.Namespace,
SourceNamespace: operatorcontroller.GlobalUserSpecifiedConfigNamespace,
TargetNamespace: operatorcontroller.DefaultOperandNamespace,
SourceNamespace: operatorcontroller.GlobalUserSpecifiedConfigNamespace,
TargetNamespace: operatorcontroller.DefaultOperandNamespace,
}); err != nil {
return nil, fmt.Errorf("failed to create client CA configmap controller: %w", err)
}
Expand Down

0 comments on commit 3a3fb20

Please sign in to comment.