Skip to content

Commit

Permalink
Addresses review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sagar Muchhal <[email protected]>
  • Loading branch information
srm09 committed Sep 2, 2022
1 parent 89e70bb commit f226084
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apis/v1beta1/vspheremachinetemplate_webhooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestVSphereMachineTemplate_ValidateCreate(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
webhook := &VSphereMachineTemplateWebhook{}
err := webhook.ValidateCreate(context.TODO(), tc.vsphereMachine)
err := webhook.ValidateCreate(context.Background(), tc.vsphereMachine)
if tc.wantErr {
g.Expect(err).To(HaveOccurred())
} else {
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestVSphereMachineTemplate_ValidateUpdate(t *testing.T) {
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
webhook := &VSphereMachineTemplateWebhook{}
err := webhook.ValidateUpdate(context.TODO(), tc.oldVSphereMachine, tc.vsphereMachine)
err := webhook.ValidateUpdate(context.Background(), tc.oldVSphereMachine, tc.vsphereMachine)
if tc.wantErr {
g.Expect(err).To(HaveOccurred())
} else {
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
"github.com/spf13/pflag"
"gopkg.in/fsnotify.v1"
"k8s.io/apimachinery/pkg/api/meta"
cliflag "k8s.io/component-base/cli/flag"
"k8s.io/component-base/logs"
_ "k8s.io/component-base/logs/json/register"
"k8s.io/klog/v2"
ctrl "sigs.k8s.io/controller-runtime"
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
ctrlmgr "sigs.k8s.io/controller-runtime/pkg/manager"
ctrlsig "sigs.k8s.io/controller-runtime/pkg/manager/signals"

Expand All @@ -48,7 +48,7 @@ import (
)

var (
setupLog = ctrllog.Log.WithName("entrypoint")
setupLog = ctrl.Log.WithName("entrypoint")
logOptions = logs.NewOptions()

managerOpts manager.Options
Expand Down Expand Up @@ -152,6 +152,7 @@ func main() {

InitFlags(pflag.CommandLine)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.CommandLine.SetNormalizeFunc(cliflag.WordSepNormalizeFunc)
pflag.Parse()

if err := logOptions.ValidateAndApply(nil); err != nil {
Expand Down

0 comments on commit f226084

Please sign in to comment.