This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 534ab748 [operator] fix field manager name
534ab748 is described below

commit 534ab7481be68c0d61d55ac25676d33ad5da95c9
Author: mfordjody <[email protected]>
AuthorDate: Mon Dec 30 12:13:10 2024 +0800

    [operator] fix field manager name
---
 operator/pkg/install/installer.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/operator/pkg/install/installer.go 
b/operator/pkg/install/installer.go
index 2e7a917b..c7111e44 100644
--- a/operator/pkg/install/installer.go
+++ b/operator/pkg/install/installer.go
@@ -121,7 +121,7 @@ func (i Installer) applyManifestSet(manifestSet 
manifest.ManifestSet) error {
 
 func (i Installer) serverSideApply(obj manifest.Manifest) error {
        var dryRun []string
-       const FieldOwner = ""
+       const fieldManager = "dubbo-operator"
        dc, err := i.Kube.DynamicClientFor(obj.GroupVersionKind(), 
obj.Unstructured, "")
        if err != nil {
                return err
@@ -133,7 +133,7 @@ func (i Installer) serverSideApply(obj manifest.Manifest) 
error {
        }
        if _, err := dc.Patch(context.TODO(), obj.GetName(), 
types.ApplyPatchType, []byte(obj.Content), metav1.PatchOptions{
                DryRun:       dryRun,
-               FieldManager: FieldOwner,
+               FieldManager: fieldManager,
        }); err != nil {
                return fmt.Errorf("failed to update resource with server-side 
apply for obj %v: %v", objStr, err)
        }

Reply via email to