Skip to content

Commit

Permalink
rename controller virtualworkspaceurls to synctarget
Browse files Browse the repository at this point in the history
  • Loading branch information
jmprusi committed Aug 3, 2022
1 parent 7053477 commit 9effac7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package virtualworkspaceurls
package synctarget

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package virtualworkspaceurls
package synctarget

import (
"net/url"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package virtualworkspaceurls
package synctarget

import (
"reflect"
Expand Down
8 changes: 4 additions & 4 deletions pkg/server/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import (
workloadnamespace "github.com/kcp-dev/kcp/pkg/reconciler/workload/namespace"
workloadplacement "github.com/kcp-dev/kcp/pkg/reconciler/workload/placement"
workloadresource "github.com/kcp-dev/kcp/pkg/reconciler/workload/resource"
virtualworkspaceurlscontroller "github.com/kcp-dev/kcp/pkg/reconciler/workload/virtualworkspaceurls"
synctargetcontroller "github.com/kcp-dev/kcp/pkg/reconciler/workload/synctarget"
)

func (s *Server) installClusterRoleAggregationController(ctx context.Context, config *rest.Config) error {
Expand Down Expand Up @@ -894,15 +894,15 @@ func (s *Server) installWorkloadsAPIExportCreateController(ctx context.Context,
})
}

func (s *Server) installVirtualWorkspaceURLsController(ctx context.Context, config *rest.Config, server *genericapiserver.GenericAPIServer) error {
controllerName := "kcp-virtualworkspace-urls-controller"
func (s *Server) installSyncTargetController(ctx context.Context, config *rest.Config, server *genericapiserver.GenericAPIServer) error {
controllerName := "kcp-synctarget-controller"
config = kcpclienthelper.NewClusterConfig(rest.AddUserAgent(rest.CopyConfig(config), controllerName))
kcpClusterClient, err := kcpclient.NewForConfig(config)
if err != nil {
return err
}

c := virtualworkspaceurlscontroller.NewController(
c := synctargetcontroller.NewController(
kcpClusterClient,
s.KcpSharedInformerFactory.Workload().V1alpha1().SyncTargets(),
s.KcpSharedInformerFactory.Tenancy().V1alpha1().ClusterWorkspaceShards(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (s *Server) Run(ctx context.Context) error {
if err := s.installSyncTargetHeartbeatController(ctx, controllerConfig); err != nil {
return err
}
if err := s.installVirtualWorkspaceURLsController(ctx, controllerConfig, delegationChainHead); err != nil {
if err := s.installSyncTargetController(ctx, controllerConfig, delegationChainHead); err != nil {
return err
}
}
Expand Down

0 comments on commit 9effac7

Please sign in to comment.