Skip to content

Commit

Permalink
Fix naming typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RemindD committed Jun 11, 2024
1 parent 70c3ea2 commit 54ca95b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions k8s/apis/workflow/v1/activation_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// log is for logging in this package.
var activationlog = logf.Log.WithName("activation-resource")
var myActivationClient client.Client
var catalogWebhookValidationMetrics *metrics.Metrics
var activationWebhookValidationMetrics *metrics.Metrics

func (r *Activation) SetupWebhookWithManager(mgr ctrl.Manager) error {
myActivationClient = mgr.GetClient()
Expand All @@ -36,12 +36,12 @@ func (r *Activation) SetupWebhookWithManager(mgr ctrl.Manager) error {
})

// initialize the controller operation metrics
if catalogWebhookValidationMetrics == nil {
if activationWebhookValidationMetrics == nil {
metrics, err := metrics.New()
if err != nil {
return err
}
catalogWebhookValidationMetrics = metrics
activationWebhookValidationMetrics = metrics
}

return ctrl.NewWebhookManagedBy(mgr).
Expand Down Expand Up @@ -73,13 +73,13 @@ func (r *Activation) ValidateCreate() (admission.Warnings, error) {
validateCreateTime := time.Now()
validationError := r.validateCreateActivation()
if validationError != nil {
catalogWebhookValidationMetrics.ControllerValidationLatency(
activationWebhookValidationMetrics.ControllerValidationLatency(
validateCreateTime,
metrics.CreateOperationType,
metrics.InvalidResource,
metrics.CatalogResourceType)
} else {
catalogWebhookValidationMetrics.ControllerValidationLatency(
activationWebhookValidationMetrics.ControllerValidationLatency(
validateCreateTime,
metrics.CreateOperationType,
metrics.ValidResource,
Expand Down

0 comments on commit 54ca95b

Please sign in to comment.