From b09de0124dc4fe0b35032c148f064475e90098e7 Mon Sep 17 00:00:00 2001 From: Mikhail Mazurskiy Date: Wed, 10 Jun 2020 15:16:37 +1000 Subject: [PATCH] Reduce k8s.io/kubernetes usage --- pkg/diff/diff.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/diff/diff.go b/pkg/diff/diff.go index f0e8a84e1..4de9aa73a 100644 --- a/pkg/diff/diff.go +++ b/pkg/diff/diff.go @@ -24,7 +24,6 @@ import ( "k8s.io/apimachinery/pkg/util/jsonmergepatch" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/kubernetes/pkg/apis/core" jsonutil "github.com/argoproj/gitops-engine/pkg/utils/json" ) @@ -262,7 +261,7 @@ func GetLastAppliedConfigAnnotation(live *unstructured.Unstructured) *unstructur var obj unstructured.Unstructured err := json.Unmarshal([]byte(lastAppliedStr), &obj) if err != nil { - log.Warnf("Failed to unmarshal %s in %s", core.LastAppliedConfigAnnotation, live.GetName()) + log.Warnf("Failed to unmarshal %s in %s", corev1.LastAppliedConfigAnnotation, live.GetName()) return nil } return &obj @@ -485,7 +484,7 @@ func HideSecretData(target *unstructured.Unstructured, live *unstructured.Unstru if err != nil { return nil, nil, err } - annotations[core.LastAppliedConfigAnnotation] = string(lastAppliedData) + annotations[corev1.LastAppliedConfigAnnotation] = string(lastAppliedData) live.SetAnnotations(annotations) } return target, live, nil