Skip to content

Commit 1a1d469

Browse files
mfojtiksoltysh
authored andcommitted
UPSTREAM: <carry>: remove apiservice from sync in CRD registration when it exists
Origin-commit: d3ceac4e065c3d2689192fda102303030cfdb928 openshift-rebase(v1.24):source=a1c12a7dd32
1 parent d4cd0ba commit 1a1d469

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: pkg/controlplane/controller/crdregistration/crdregistration_controller.go

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

197197
if apiserver.APIServiceAlreadyExists(groupVersion) {
198+
// Removing APIService from sync means the CRD registration controller won't sync this APIService
199+
// anymore. If the APIService is managed externally, this will mean the external component can
200+
// update this APIService without CRD controller stomping the changes on it.
201+
c.apiServiceRegistration.RemoveAPIServiceToSync(apiServiceName)
198202
return nil
199203
}
200204

0 commit comments

Comments
 (0)