mirror of
https://github.com/storytold/irsa-manager.git
synced 2026-10-18 07:33:15 +00:00
no update (secret)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package kubernetes
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
)
|
||||
|
||||
func (h KubernetesClient) Create(ctx context.Context, obj client.Object) error {
|
||||
opts := []client.CreateOption{
|
||||
client.FieldOwner(h.owner.Field),
|
||||
}
|
||||
u, err := h.toUnstructured(obj)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = h.client.Create(ctx, u, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user