Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed Mar 10, 2023
1 parent 61f7d79 commit 3cadf3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions pkg/server/virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apiserver/pkg/audit"
kaudit "k8s.io/apiserver/pkg/audit"
genericapiserver "k8s.io/apiserver/pkg/server"
"k8s.io/apiserver/pkg/server/healthz"
Expand Down Expand Up @@ -101,7 +100,7 @@ func newVirtualConfig(
return &VirtualConfig{*c}, nil
}

func (c *VirtualConfig) Complete(auth genericapiserver.AuthenticationInfo, auditEvaluator kaudit.PolicyRuleEvaluator, auditBackend audit.Backend, externalAddress string) CompletedVirtualConfig {
func (c *VirtualConfig) Complete(auth genericapiserver.AuthenticationInfo, auditEvaluator kaudit.PolicyRuleEvaluator, auditBackend kaudit.Backend, externalAddress string) CompletedVirtualConfig {
if c == nil {
return CompletedVirtualConfig{}
}
Expand Down
20 changes: 10 additions & 10 deletions tmc/pkg/virtual/syncer/builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/kcp-dev/kcp/pkg/indexers"
"github.com/kcp-dev/kcp/pkg/virtual/framework/forwardingregistry"
"github.com/kcp-dev/kcp/pkg/virtual/framework/rootapiserver"
apireconciler2 "github.com/kcp-dev/kcp/tmc/pkg/virtual/syncer/controllers/apireconciler"
transformations2 "github.com/kcp-dev/kcp/tmc/pkg/virtual/syncer/transformations"
upsyncer2 "github.com/kcp-dev/kcp/tmc/pkg/virtual/syncer/upsyncer"
"github.com/kcp-dev/kcp/tmc/pkg/virtual/syncer/controllers/apireconciler"
"github.com/kcp-dev/kcp/tmc/pkg/virtual/syncer/transformations"
"github.com/kcp-dev/kcp/tmc/pkg/virtual/syncer/upsyncer"
)

const (
Expand All @@ -58,13 +58,13 @@ func BuildVirtualWorkspace(
indexers.AddIfNotPresentOrDie(
cachedKCPInformers.Workload().V1alpha1().SyncTargets().Informer().GetIndexer(),
cache.Indexers{
apireconciler2.IndexSyncTargetsByExport: apireconciler2.IndexSyncTargetsByExports,
apireconciler.IndexSyncTargetsByExport: apireconciler.IndexSyncTargetsByExports,
},
)
indexers.AddIfNotPresentOrDie(
cachedKCPInformers.Apis().V1alpha1().APIExports().Informer().GetIndexer(),
cache.Indexers{
apireconciler2.IndexAPIExportsByAPIResourceSchema: apireconciler2.IndexAPIExportsByAPIResourceSchemas,
apireconciler.IndexAPIExportsByAPIResourceSchema: apireconciler.IndexAPIExportsByAPIResourceSchemas,
},
)

Expand All @@ -90,9 +90,9 @@ func BuildVirtualWorkspace(
}
return true
},
transformer: &transformations2.SyncerResourceTransformer{
TransformationProvider: &transformations2.SpecDiffTransformation{},
SummarizingRulesProvider: &transformations2.DefaultSummarizingRules{},
transformer: &transformations.SyncerResourceTransformer{
TransformationProvider: &transformations.SpecDiffTransformation{},
SummarizingRulesProvider: &transformations.DefaultSummarizingRules{},
},
storageWrapperBuilder: forwardingregistry.WithStaticLabelSelector,
}).buildVirtualWorkspace(),
Expand All @@ -110,8 +110,8 @@ func BuildVirtualWorkspace(
apiGroupResource.Resource == "pods" ||
apiGroupResource.Resource == "endpoints")
},
transformer: &upsyncer2.UpsyncerResourceTransformer{},
storageWrapperBuilder: upsyncer2.WithStaticLabelSelectorAndInWriteCallsCheck,
transformer: &upsyncer.UpsyncerResourceTransformer{},
storageWrapperBuilder: upsyncer.WithStaticLabelSelectorAndInWriteCallsCheck,
}).buildVirtualWorkspace(),
},
}
Expand Down

0 comments on commit 3cadf3f

Please sign in to comment.