Skip to content

Commit 1d3f8e7

Browse files
author
Yi Jiang
committed
Stop creating TKG content source related resources.
This change stops watching TKG content source in the provider configmap and creating/updating/deleting related resources, such as ContentLibraryProvider and ContentSourceBindings when WCP_VM_Image_Registry FSS is enabled. Test done: - make test - make test-integration - manually deployed to a WCP cluster - passed internal gce2e tests - no TKG related ContentSource/ContentSourceBindings are created.
1 parent a148db0 commit 1d3f8e7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

controllers/controllers.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ func AddToManager(ctx *context.ControllerManagerContext, mgr manager.Manager) er
3333
if err := infraprovider.AddToManager(ctx, mgr); err != nil {
3434
return errors.Wrap(err, "failed to initialize InfraProvider controller")
3535
}
36-
if err := providerconfigmap.AddToManager(ctx, mgr); err != nil {
37-
return errors.Wrap(err, "failed to initialize ProviderConfigMap controller")
38-
}
3936
if err := virtualmachine.AddToManager(ctx, mgr); err != nil {
4037
return errors.Wrap(err, "failed to initialize VirtualMachine controller")
4138
}
@@ -68,6 +65,12 @@ func AddToManager(ctx *context.ControllerManagerContext, mgr manager.Manager) er
6865
if err := contentsource.AddToManager(ctx, mgr); err != nil {
6966
return errors.Wrap(err, "failed to initialize ContentSource controller")
7067
}
68+
// We only update TKG related ContentSource/ContentLibraryProvider/ContentSourceBinding resources
69+
// in provider configmap reconcile. These resources will be removed when the FSS is enabled,
70+
// add provider configmap controller to the manager only when the FSS is disabled.
71+
if err := providerconfigmap.AddToManager(ctx, mgr); err != nil {
72+
return errors.Wrap(err, "failed to initialize ProviderConfigMap controller")
73+
}
7174
}
7275
return nil
7376
}

0 commit comments

Comments
 (0)