Skip to content

Commit dfd1e06

Browse files
committed
Adjustments required for kubernetes group update
1 parent bb02d84 commit dfd1e06

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

internal/controller/runtime/client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package runtime
77
import (
88
"context"
99

10+
"k8s.io/apimachinery/pkg/runtime"
1011
"sigs.k8s.io/controller-runtime/pkg/client"
1112
)
1213

@@ -31,6 +32,7 @@ type (
3132
ClientPatch func(context.Context, client.Object, client.Patch, ...client.PatchOption) error
3233
ClientDeleteAll func(context.Context, client.Object, ...client.DeleteAllOfOption) error
3334
ClientUpdate func(context.Context, client.Object, ...client.UpdateOption) error
35+
ClientApply func(context.Context, runtime.ApplyConfiguration, ...client.ApplyOption) error
3436
)
3537

3638
// ClientWriter implements [client.Writer] by composing assignable functions.
@@ -40,6 +42,7 @@ type ClientWriter struct {
4042
ClientDeleteAll
4143
ClientPatch
4244
ClientUpdate
45+
ClientApply
4346
}
4447

4548
var _ client.Writer = ClientWriter{}
@@ -74,3 +77,7 @@ func (fn ClientPatch) Patch(ctx context.Context, obj client.Object, patch client
7477
func (fn ClientUpdate) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error {
7578
return fn(ctx, obj, opts...)
7679
}
80+
81+
func (fn ClientApply) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error {
82+
return fn(ctx, obj, opts...)
83+
}

internal/controller/runtime/pod_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func newPodClient(config *rest.Config) (rest.Interface, error) {
3030
if err != nil {
3131
return nil, err
3232
}
33-
return apiutil.RESTClientForGVK(gvk, false, config, codecs, httpClient)
33+
return apiutil.RESTClientForGVK(gvk, false, false, config, codecs, httpClient)
3434
}
3535

3636
// +kubebuilder:rbac:groups="",resources="pods/exec",verbs={create}

0 commit comments

Comments
 (0)