From ddc17d1983a93ccb42f868f7772e1de31bdf85f6 Mon Sep 17 00:00:00 2001 From: NoSkillGirl Date: Wed, 23 Dec 2020 13:06:48 +0530 Subject: [PATCH] fixed syntax error --- pkg/webhooks/generate/generate.go | 6 +++--- pkg/webhooks/generation.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/webhooks/generate/generate.go b/pkg/webhooks/generate/generate.go index 34ffc0962b..6646b39d6c 100644 --- a/pkg/webhooks/generate/generate.go +++ b/pkg/webhooks/generate/generate.go @@ -142,7 +142,7 @@ func retryApplyResource(client *kyvernoclient.Clientset, grSpec kyverno.Generate log.V(4).Info("querying all generate requests") selector := labels.SelectorFromSet(labels.Set(map[string]string{ "generate.kyverno.io/policy-name": grSpec.Policy, - "generate.kyverno.io/resource-name" grSpec.Resource.Name, + "generate.kyverno.io/resource-name": grSpec.Resource.Name, "generate.kyverno.io/resource-kind": grSpec.Resource.Kind, "generate.kyverno.io/resource-namespace": grSpec.Resource.Namespace, })) @@ -159,7 +159,7 @@ func retryApplyResource(client *kyvernoclient.Clientset, grSpec kyverno.Generate v.Spec.Context = gr.Spec.Context v.Spec.Policy = gr.Spec.Policy v.Spec.Resource = gr.Spec.Resource - + _, err = client.KyvernoV1().GenerateRequests(config.KyvernoNamespace).Update(context.TODO(), v, metav1.UpdateOptions{}) if err != nil { return err @@ -171,7 +171,7 @@ func retryApplyResource(client *kyvernoclient.Clientset, grSpec kyverno.Generate gr.SetGenerateName("gr-") gr.SetLabels(map[string]string{ "generate.kyverno.io/policy-name": grSpec.Policy, - "generate.kyverno.io/resource-name" grSpec.Resource.Name, + "generate.kyverno.io/resource-name": grSpec.Resource.Name, "generate.kyverno.io/resource-kind": grSpec.Resource.Kind, "generate.kyverno.io/resource-namespace": grSpec.Resource.Namespace, }) diff --git a/pkg/webhooks/generation.go b/pkg/webhooks/generation.go index 0d3dbe8ca2..62f5c9e952 100644 --- a/pkg/webhooks/generation.go +++ b/pkg/webhooks/generation.go @@ -88,7 +88,7 @@ func (ws *WebhookServer) deleteGR(logger logr.Logger, engineResponse *response.E logger.V(4).Info("querying all generate requests") selector := labels.SelectorFromSet(labels.Set(map[string]string{ "generate.kyverno.io/policy-name": engineResponse.PolicyResponse.Policy, - "generate.kyverno.io/resource-name" engineResponse.PolicyResponse.Resource.Name, + "generate.kyverno.io/resource-name": engineResponse.PolicyResponse.Resource.Name, "generate.kyverno.io/resource-kind": engineResponse.PolicyResponse.Resource.Kind, "generate.kyverno.io/resource-namespace": engineResponse.PolicyResponse.Resource.Namespace, }))