Skip to content

Commit 7527570

Browse files
mfojtikbertinatto
authored andcommitted
UPSTREAM: <carry>: remove apiservice from sync in CRD registration when it exists
OpenShift-Rebase-Source: 1a1d469
1 parent fa8b05d commit 7527570

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/controlplane/controller/crdregistration/crdregistration_controller.go

+4
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ func (c *crdRegistrationController) handleVersionUpdate(groupVersion schema.Grou
198198
apiServiceName := groupVersion.Version + "." + groupVersion.Group
199199

200200
if apiserver.APIServiceAlreadyExists(groupVersion) {
201+
// Removing APIService from sync means the CRD registration controller won't sync this APIService
202+
// anymore. If the APIService is managed externally, this will mean the external component can
203+
// update this APIService without CRD controller stomping the changes on it.
204+
c.apiServiceRegistration.RemoveAPIServiceToSync(apiServiceName)
201205
return nil
202206
}
203207

0 commit comments

Comments
 (0)