perf: remove lc dependency

This commit is contained in:
2024-12-12 23:13:54 +03:30
parent 3912ecef44
commit d3fd04b20c
19 changed files with 182 additions and 500 deletions

View File

@@ -5,7 +5,8 @@ import (
"encoding/json"
"fmt"
"gitea.com/logicamp/lc"
"flink-kube-operator/pkg"
"go.uber.org/zap"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
@@ -30,7 +31,7 @@ func (crd *Crd) Patch(jobUid types.UID, patchData map[string]interface{}) error
metaV1.PatchOptions{},
)
if err != nil {
lc.Logger.Error(
pkg.Logger.Error(
"[crd] [status] error patching custom resource status",
zap.String("namespace", job.GetNamespace()),
zap.Error(err),
@@ -39,13 +40,13 @@ func (crd *Crd) Patch(jobUid types.UID, patchData map[string]interface{}) error
}
newJob, err := convertFromUnstructured(unstructuredJob)
if err != nil {
lc.Logger.Error("[crd] [status] error in structure unstructured patched", zap.Error(err))
pkg.Logger.Error("[crd] [status] error in structure unstructured patched", zap.Error(err))
} else {
lc.Logger.Debug("[crd] [status] patched")
pkg.Logger.Debug("[crd] [status] patched")
}
jobs[jobUid] = newJob
if err != nil {
lc.Logger.Error("[crd] [status] ", zap.Error(err))
pkg.Logger.Error("[crd] [status] ", zap.Error(err))
return err
}
return nil