@@ -30,28 +30,28 @@ import (
30
30
// will be overridden.
31
31
func WithFieldOwner (c Client , fieldOwner string ) Client {
32
32
return & clientWithFieldManager {
33
- manager : fieldOwner ,
34
- c : c ,
35
- Reader : c ,
33
+ owner : fieldOwner ,
34
+ c : c ,
35
+ Reader : c ,
36
36
}
37
37
}
38
38
39
39
type clientWithFieldManager struct {
40
- manager string
41
- c Client
40
+ owner string
41
+ c Client
42
42
Reader
43
43
}
44
44
45
45
func (f * clientWithFieldManager ) Create (ctx context.Context , obj Object , opts ... CreateOption ) error {
46
- return f .c .Create (ctx , obj , append ([]CreateOption {FieldOwner (f .manager )}, opts ... )... )
46
+ return f .c .Create (ctx , obj , append ([]CreateOption {FieldOwner (f .owner )}, opts ... )... )
47
47
}
48
48
49
49
func (f * clientWithFieldManager ) Update (ctx context.Context , obj Object , opts ... UpdateOption ) error {
50
- return f .c .Update (ctx , obj , append ([]UpdateOption {FieldOwner (f .manager )}, opts ... )... )
50
+ return f .c .Update (ctx , obj , append ([]UpdateOption {FieldOwner (f .owner )}, opts ... )... )
51
51
}
52
52
53
53
func (f * clientWithFieldManager ) Patch (ctx context.Context , obj Object , patch Patch , opts ... PatchOption ) error {
54
- return f .c .Patch (ctx , obj , patch , append ([]PatchOption {FieldOwner (f .manager )}, opts ... )... )
54
+ return f .c .Patch (ctx , obj , patch , append ([]PatchOption {FieldOwner (f .owner )}, opts ... )... )
55
55
}
56
56
57
57
func (f * clientWithFieldManager ) Delete (ctx context.Context , obj Object , opts ... DeleteOption ) error {
@@ -73,15 +73,15 @@ func (f *clientWithFieldManager) IsObjectNamespaced(obj runtime.Object) (bool, e
73
73
74
74
func (f * clientWithFieldManager ) Status () StatusWriter {
75
75
return & subresourceClientWithFieldOwner {
76
- owner : f .manager ,
76
+ owner : f .owner ,
77
77
subresourceWriter : f .c .Status (),
78
78
}
79
79
}
80
80
81
81
func (f * clientWithFieldManager ) SubResource (subresource string ) SubResourceClient {
82
82
c := f .c .SubResource (subresource )
83
83
return & subresourceClientWithFieldOwner {
84
- owner : f .manager ,
84
+ owner : f .owner ,
85
85
subresourceWriter : c ,
86
86
SubResourceReader : c ,
87
87
}
0 commit comments