Update runnerdeployment_webhook.go (#1271)

This commit is contained in:
Naka Masato 2022-03-25 09:24:13 +09:00 committed by GitHub
parent e7ef21fdf9
commit af8d8f7e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ import (
) )
// log is for logging in this package. // log is for logging in this package.
var runenrDeploymentLog = logf.Log.WithName("runnerdeployment-resource") var runnerDeploymentLog = logf.Log.WithName("runnerdeployment-resource")
func (r *RunnerDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error { func (r *RunnerDeployment) SetupWebhookWithManager(mgr ctrl.Manager) error {
return ctrl.NewWebhookManagedBy(mgr). return ctrl.NewWebhookManagedBy(mgr).
@ -49,13 +49,13 @@ var _ webhook.Validator = &RunnerDeployment{}
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type // ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (r *RunnerDeployment) ValidateCreate() error { func (r *RunnerDeployment) ValidateCreate() error {
runenrDeploymentLog.Info("validate resource to be created", "name", r.Name) runnerDeploymentLog.Info("validate resource to be created", "name", r.Name)
return r.Validate() return r.Validate()
} }
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (r *RunnerDeployment) ValidateUpdate(old runtime.Object) error { func (r *RunnerDeployment) ValidateUpdate(old runtime.Object) error {
runenrDeploymentLog.Info("validate resource to be updated", "name", r.Name) runnerDeploymentLog.Info("validate resource to be updated", "name", r.Name)
return r.Validate() return r.Validate()
} }