From d8caeb7cec3c53aa6aba501ee9bda41c16efa900 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Tue, 3 Nov 2020 16:07:44 +0200 Subject: [PATCH] Remove unused code Signed-off-by: Stefan Prodan --- controllers/kustomization_request.go | 45 ---------------------------- 1 file changed, 45 deletions(-) delete mode 100644 controllers/kustomization_request.go diff --git a/controllers/kustomization_request.go b/controllers/kustomization_request.go deleted file mode 100644 index 53c1899e..00000000 --- a/controllers/kustomization_request.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2020 The Flux authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package controllers - -import ( - "context" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/util/retry" - "sigs.k8s.io/controller-runtime/pkg/client" - - kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta1" - "github.com/fluxcd/pkg/apis/meta" -) - -func requestReconciliation(r client.Client, name types.NamespacedName) error { - var kustomization kustomizev1.Kustomization - return retry.RetryOnConflict(retry.DefaultBackoff, func() (err error) { - if err := r.Get(context.TODO(), name, &kustomization); err != nil { - return err - } - - if kustomization.Annotations == nil { - kustomization.Annotations = make(map[string]string) - } - kustomization.Annotations[meta.ReconcileRequestAnnotation] = metav1.Now().String() - err = r.Update(context.TODO(), &kustomization) - return - }) -}