manage status

This commit is contained in:
kkb0318
2024-05-07 19:06:51 +09:00
parent e0cd191793
commit 16813de7cd
14 changed files with 138 additions and 101 deletions
+4 -4
View File
@@ -6,15 +6,15 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
)
func (h KubernetesClient) Create(ctx context.Context, obj client.Object) error {
func (c KubernetesClient) Create(ctx context.Context, obj client.Object) error {
opts := []client.CreateOption{
client.FieldOwner(h.owner.Field),
client.FieldOwner(c.owner.Field),
}
u, err := h.toUnstructured(obj)
u, err := c.toUnstructured(obj)
if err != nil {
return err
}
err = h.client.Create(ctx, u, opts...)
err = c.client.Create(ctx, u, opts...)
if err != nil {
return err
}