Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#1838 from GoogleCloudPlatform/…
Browse files Browse the repository at this point in the history
…acpana/fix-main

refactor: interface changes for fm contlr
  • Loading branch information
google-oss-prow[bot] authored May 18, 2024
2 parents bcd652f + 44d2a67 commit d65269d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controller/direct/gkehub/featuremembership_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/manager"

krm "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/gkehub/v1beta1"
Expand Down Expand Up @@ -67,7 +68,7 @@ type gkeHubAdapter struct {
var _ directbase.Adapter = &gkeHubAdapter{}

// AdapterForObject implements the Model interface.
func (m *gkeHubModel) AdapterForObject(ctx context.Context, u *unstructured.Unstructured) (directbase.Adapter, error) {
func (m *gkeHubModel) AdapterForObject(ctx context.Context, reader client.Reader, u *unstructured.Unstructured) (directbase.Adapter, error) {
projectsLocationsFeaturesService, err := m.gcpClient.newProjectsLocationsFeaturesService(ctx)
if err != nil {
return nil, err
Expand Down Expand Up @@ -170,6 +171,10 @@ func (a *gkeHubAdapter) Update(ctx context.Context, u *unstructured.Unstructured
return nil
}

func (a *gkeHubAdapter) Export(context.Context) (*unstructured.Unstructured, error) {
return nil, nil
}

// fullyQualifiedNameForMembership constructions a fully qualified name for a gkehub resource
// to be used in API calls. The format expected is: "projects/*/locations/*/memberships/{membershipId}".
// Func assumes values are well formed and validated.
Expand Down

0 comments on commit d65269d

Please sign in to comment.