vmware / antrea-operator-for-kubernetes

Antrea Operator for Kubernetes deployments
Other
15 stars 12 forks source link

Fix issues imported by upgrading Openshift modules #78

Closed jwsui closed 1 year ago

jwsui commented 1 year ago
  1. Fix 'AntreaInstall is not registered to scheme' issue. OperatorClusterClient is used to perform CRUD operations after upgrading, and OperatorClusterClient uses global scheme(aka scheme.Scheme) to register CRD. But antrea-operator creates a new scheme by scheme := runtime.NewScheme(), which finally causes that CRD is not registered to the scheme used by OperatorClusterClient. To fix this, antrea-operator uses the same scheme as OperatorClusterClient.
  2. Function 'apply.ApplyObject' updates its interface to receive type 'Object', so there is no need to convert 'Object' to 'Unstructured'.