Skip to content

Commit 1118f34

Browse files
author
Joshua Reed
committed
Up verbosity level of webhook logs to decrease noise.
1 parent 812c762 commit 1118f34

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

api/v1beta1/cloudstackcluster_webhook.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var _ webhook.Defaulter = &CloudStackCluster{}
4444

4545
// Default implements webhook.Defaulter so a webhook will be registered for the type
4646
func (r *CloudStackCluster) Default() {
47-
cloudstackclusterlog.Info("default", "name", r.Name)
47+
cloudstackclusterlog.V(1).Info("entered api default setting webhook", "api resource name", r.Name)
4848
// No defaulted values supported yet.
4949
}
5050

@@ -54,7 +54,7 @@ var _ webhook.Validator = &CloudStackCluster{}
5454

5555
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5656
func (r *CloudStackCluster) ValidateCreate() error {
57-
cloudstackclusterlog.Info("validate create", "name", r.Name)
57+
cloudstackclusterlog.V(1).Info("entered validate create webhook", "api resource name", r.Name)
5858

5959
var errorList field.ErrorList
6060

@@ -85,7 +85,7 @@ func (r *CloudStackCluster) ValidateCreate() error {
8585

8686
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
8787
func (r *CloudStackCluster) ValidateUpdate(old runtime.Object) error {
88-
cloudstackclusterlog.Info("validate update", "name", r.Name)
88+
cloudstackclusterlog.V(1).Info("entered validate update webhook", "api resource name", r.Name)
8989

9090
var (
9191
spec = r.Spec
@@ -127,7 +127,7 @@ func (r *CloudStackCluster) ValidateUpdate(old runtime.Object) error {
127127

128128
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
129129
func (r *CloudStackCluster) ValidateDelete() error {
130-
cloudstackclusterlog.Info("validate delete", "name", r.Name)
130+
cloudstackclusterlog.V(1).Info("entered validate delete webhook", "api resource name", r.Name)
131131
// No deletion validations. Deletion webhook not enabled.
132132
return nil
133133
}

api/v1beta1/cloudstackmachine_webhook.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var _ webhook.Defaulter = &CloudStackMachine{}
4444

4545
// Default implements webhook.Defaulter so a webhook will be registered for the type
4646
func (r *CloudStackMachine) Default() {
47-
cloudstackmachinelog.Info("default", "name", r.Name)
47+
cloudstackmachinelog.V(1).Info("entered api default setting webhook, no defaults to set", "api resource name", r.Name)
4848
// No defaulted values supported yet.
4949
}
5050

@@ -54,7 +54,7 @@ var _ webhook.Validator = &CloudStackMachine{}
5454

5555
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5656
func (r *CloudStackMachine) ValidateCreate() error {
57-
cloudstackmachinelog.Info("validate create", "name", r.Name)
57+
cloudstackmachinelog.V(1).Info("entered validate create webhook", "api resource name", r.Name)
5858

5959
var errorList field.ErrorList
6060

@@ -71,7 +71,7 @@ func (r *CloudStackMachine) ValidateCreate() error {
7171

7272
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
7373
func (r *CloudStackMachine) ValidateUpdate(old runtime.Object) error {
74-
cloudstackmachinelog.Info("validate update", "name", r.Name)
74+
cloudstackmachinelog.V(1).Info("entered validate update webhook", "api resource name", r.Name)
7575

7676
var errorList field.ErrorList
7777

@@ -102,7 +102,7 @@ func (r *CloudStackMachine) ValidateUpdate(old runtime.Object) error {
102102

103103
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
104104
func (r *CloudStackMachine) ValidateDelete() error {
105-
cloudstackmachinelog.Info("validate delete", "name", r.Name)
105+
cloudstackmachinelog.V(1).Info("entered validate delete webhook", "api resource name", r.Name)
106106
// No deletion validations. Deletion webhook not enabled.
107107
return nil
108108
}

api/v1beta1/cloudstackmachinetemplate_webhook.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var _ webhook.Defaulter = &CloudStackMachineTemplate{}
4444

4545
// Default implements webhook.Defaulter so a webhook will be registered for the type
4646
func (r *CloudStackMachineTemplate) Default() {
47-
cloudstackmachinetemplatelog.Info("default", "name", r.Name)
47+
cloudstackmachinetemplatelog.V(1).Info("entered default setting webhook", "api resource name", r.Name)
4848
// No defaulted values supported yet.
4949
}
5050

@@ -54,7 +54,7 @@ var _ webhook.Validator = &CloudStackMachineTemplate{}
5454

5555
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
5656
func (r *CloudStackMachineTemplate) ValidateCreate() error {
57-
cloudstackmachinetemplatelog.V(1).Info("validate create", "name", r.Name)
57+
cloudstackmachinetemplatelog.V(1).Info("entered validate create webhook", "api resource name", r.Name)
5858

5959
var (
6060
errorList field.ErrorList
@@ -84,7 +84,7 @@ func (r *CloudStackMachineTemplate) ValidateCreate() error {
8484

8585
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
8686
func (r *CloudStackMachineTemplate) ValidateUpdate(old runtime.Object) error {
87-
cloudstackmachinetemplatelog.V(1).Info("validate update", "name", r.Name)
87+
cloudstackmachinetemplatelog.V(1).Info("entered validate update webhook", "api resource name", r.Name)
8888

8989
oldMachineTemplate, ok := old.(*CloudStackMachineTemplate)
9090
if !ok {
@@ -118,7 +118,7 @@ func (r *CloudStackMachineTemplate) ValidateUpdate(old runtime.Object) error {
118118

119119
// ValidateDelete implements webhook.Validator so a webhook will be registered for the type
120120
func (r *CloudStackMachineTemplate) ValidateDelete() error {
121-
cloudstackmachinetemplatelog.Info("validate delete", "name", r.Name)
121+
cloudstackmachinetemplatelog.V(1).Info("entered validate delete webhook", "api resource name", r.Name)
122122
// No deletion validations. Deletion webhook not enabled.
123123
return nil
124124
}

0 commit comments

Comments
 (0)