You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added feature to handle user managed operators (BYO) (#1078)
* fixed make bundle-manifests to check for yq first
Signed-off-by: Henry Li <[email protected]>
* updated controller-gen to v0.14.0
Signed-off-by: Henry Li <[email protected]>
* added UserManaged field to OperandRegistry
- for BYO scenario
Signed-off-by: Henry Li <[email protected]>
* updated operator/operand reconcile for userManaged
- so that controllers do not try to create/update/manage Subscription
for an operator which is userManaged
- so that controllers do not spit out errors as it did previously
- so that controllers update OperandRequest with Running status
- operands in OperandConfig should still be created
- currently missing proper cleanup when OperandRequest is deleted
Signed-off-by: Henry Li <[email protected]>
* updated user managed logic to properly cleanup
Signed-off-by: Henry Li <[email protected]>
* increase lint timeout to 300s
Signed-off-by: Henry Li <[email protected]>
* fixed test regression by adding opreq-control label
Signed-off-by: Henry Li <[email protected]>
* updated to handle BYO operator in different ns
- when the user managed operator is out of the watch scope of ODLM
- i.e. ODLM cannot see the Subscription
Signed-off-by: Henry Li <[email protected]>
* updated DeleteRedundantCSV to ignore any CSVs where olm.copiedFrom label
exists
Signed-off-by: Henry Li <[email protected]>
---------
Signed-off-by: Henry Li <[email protected]>
klog.Warningf("There is no Subscription %s or %s in the namespace %s and %s", operatorName, opdRegistry.PackageName, namespace, registryInstance.Namespace)
105
-
continue
106
-
107
-
} elseiferr!=nil {
102
+
iferr!=nil {
108
103
merr.Add(errors.Wrapf(err, "failed to get the Subscription %s in the namespace %s and %s", operatorName, namespace, registryInstance.Namespace))
109
104
returnmerr
110
105
}
111
106
112
-
if_, ok:=sub.Labels[constant.OpreqLabel]; !ok {
113
-
// Subscription existing and not managed by OperandRequest controller
114
-
klog.Warningf("Subscription %s in the namespace %s isn't created by ODLM", sub.Name, sub.Namespace)
115
-
}
107
+
if!opdRegistry.UserManaged {
108
+
ifsub==nil {
109
+
klog.Warningf("There is no Subscription %s or %s in the namespace %s and %s", operatorName, opdRegistry.PackageName, namespace, registryInstance.Namespace)
110
+
continue
111
+
}
116
112
117
-
// It the installplan is not created yet, ODLM will try later
klog.Infof("Subscription %s in the namespace %s is NOT managed by %s/%s, Skip reconciling Operands", sub.Name, sub.Namespace, requestInstance.Namespace, requestInstance.Name)
klog.Infof("Subscription %s in the namespace %s is NOT managed by %s/%s, Skip reconciling Operands", sub.Name, sub.Namespace, requestInstance.Namespace, requestInstance.Name)
klog.V(2).Infof("There is no service: %s from the OperandConfig instance: %s/%s, Skip reconciling Operands", operand.Name, registryKey.Namespace, req.Registry)
0 commit comments