Skip to content

Commit 7009bfa

Browse files
committed
react to library-go change
1 parent 792ef54 commit 7009bfa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/cmd/operator/cmd.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package operator
22

33
import (
44
"github.com/spf13/cobra"
5+
6+
"k8s.io/utils/clock"
57

68
"github.com/openshift/cluster-authentication-operator/pkg/operator"
79
"github.com/openshift/cluster-authentication-operator/pkg/version"
@@ -11,7 +13,7 @@ import (
1113
const componentName = "cluster-authentication-operator"
1214

1315
func NewOperator() *cobra.Command {
14-
cmd := controllercmd.NewControllerCommandConfig(componentName, version.Get(), operator.RunOperator).NewCommand()
16+
cmd := controllercmd.NewControllerCommandConfig(componentName, version.Get(), operator.RunOperator, clock.RealClock{}).NewCommand()
1517
cmd.Use = "operator"
1618
cmd.Short = "Start the Authentication Operator"
1719
return cmd

pkg/operator/replacement_starter.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
apierrors "k8s.io/apimachinery/pkg/api/errors"
4040
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4141
"k8s.io/client-go/kubernetes"
42-
"k8s.io/utils/clock"
4342
)
4443

4544
type authenticationOperatorInput struct {
@@ -118,7 +117,7 @@ func CreateOperatorInputFromMOM(ctx context.Context, momInput libraryapplyconfig
118117
Kind: "Deployment",
119118
Namespace: "openshift-authentication-operator",
120119
Name: "authentication-operator",
121-
})
120+
}, momInput.Clock)
122121

123122
return &authenticationOperatorInput{
124123
kubeClient: kubeClient,
@@ -167,7 +166,7 @@ func CreateControllerInputFromControllerContext(ctx context.Context, controllerC
167166
}
168167

169168
authenticationOperatorClient, dynamicInformers, err := genericoperatorclient.NewClusterScopedOperatorClient(
170-
clock.RealClock{},
169+
controllerContext.Clock,
171170
controllerContext.KubeConfig,
172171
operatorv1.GroupVersion.WithResource("authentications"),
173172
operatorv1.GroupVersion.WithKind("Authentication"),
@@ -187,6 +186,7 @@ func CreateControllerInputFromControllerContext(ctx context.Context, controllerC
187186
Namespace: "openshift-authentication-operator",
188187
Name: "authentication-operator",
189188
},
189+
controllerContext.Clock,
190190
)
191191

192192
return &authenticationOperatorInput{

0 commit comments

Comments
 (0)