feat: add early update job def into patch

This commit is contained in:
Mohamad Khani 2024-12-08 19:29:05 +03:30
parent 0993ed4cb1
commit bc20345fc0
3 changed files with 9 additions and 15801 deletions

View File

@ -1,10 +1,16 @@
{
"cSpell.words": [
"apiextensions",
"clientcmd",
"controllerutil",
"deepcopy",
"Finalizer",
"flink",
"gitea",
"gonanoid",
"logicamp",
"Namespaceable",
"reactivex",
"repsert",
"rxgo"
]

15799
bunt.db

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@ import (
"k8s.io/apimachinery/pkg/types"
)
func (crd Crd) Patch(jobUid types.UID, patchData map[string]interface{}) error {
func (crd *Crd) Patch(jobUid types.UID, patchData map[string]interface{}) error {
job := GetJob(jobUid)
patchBytes, err := json.Marshal(patchData)
@ -37,12 +37,13 @@ func (crd Crd) Patch(jobUid types.UID, patchData map[string]interface{}) error {
)
return err
}
_, err = convertFromUnstructured(unstructuredJob)
newJob, err := convertFromUnstructured(unstructuredJob)
if err != nil {
lc.Logger.Error("[crd] [status] error in structure unstructured patched", zap.Error(err))
} else {
lc.Logger.Debug("[crd] [status] patched")
}
jobs[jobUid] = newJob
if err != nil {
lc.Logger.Error("[crd] [status] ", zap.Error(err))
return err