-
Notifications
You must be signed in to change notification settings - Fork 50
[4.2] Sort Catalogsource by priority in ODLM #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
controllers/operator/manager.go
Outdated
} | ||
// Compare catalogsource priorities first, higher priority comes first | ||
iPriority, jPriority := s[i].Priority, s[j].Priority | ||
klog.Infof("iPriority: %v, jPriority: %v", iPriority, jPriority) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we reveal this log information when verbosity is set to 2?
if err := m.Reader.Get(ctx, types.NamespacedName{Name: pm.Status.CatalogSource, Namespace: pm.Status.CatalogSourceNamespace}, catalogsource); err != nil { | ||
klog.Warning(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we could return error here.
Usually when err != nil
, we will get catalogsource
as nil
. Therefore, it will error out in the next line when we try to read catalogsource.Spec.Priority
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Daniel-Fan, YCShen1010 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* tolerate multi entries for same subscription (#907) * tolerate multi entries for same subscription in one OperandRequest Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * bump to go 1.20 Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * add new value no-op in installmode replace supportStatus (#909) * add new value no-op in installmode Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * add preserve unknown field Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * move preserve unknown field position Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update golangci-lint-version Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * skip sub updating for discontinued services (#910) * skip sub updating for discontinued services Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update annotations only Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * typo Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update opreq annotation Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update annotation channel Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * fix go fmt Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * set annotation when installmode is no-op Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Trigger build with new base image * build(deps): bump github.com/prometheus/client_golang (#895) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.11.0...v1.11.1) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tolerate multi catalogsource for same service (#914) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Remove annotation patch to avoid status lost (#915) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * check for status.services, im service status (#916) * check for status.services, im service status Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * alter check for im operator status Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * export function Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * account for opreq that do not request im Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * typo Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * clean up implementation Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * linter changes Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * service.operatorName value from managedBy to requested name Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * change common ui operator name to look for Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> --------- Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> Co-authored-by: Ben Luzarraga <luzarragaben@ibm.com> * cp3 migrate to aws (#920) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Remove the status.services entry for an operator if it is removed from an operandrequest (#922) * remove status when operator removed from opreq Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * remove status.services entry when operator removed from request Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> * run make code-dev Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> --------- Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> Co-authored-by: Ben Luzarraga <luzarragaben@ibm.com> * Indicate multi requested service version conflict (#921) * Indicate multi requested service version conflict Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * fix lint issue Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump golang.org/x/text from 0.3.6 to 0.3.8 (#898) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.6 to 0.3.8. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.3.6...v0.3.8) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test case (#927) * Update Kind cluster version Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update OLM version and install script to v0.24.0 Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update test cases Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update CRD template Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * set owner reference for CR created by OpReq Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update error msg Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update go mod Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update Makefile to build bundle and catalog image Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * dolm annotation updated for nss operator (#925) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update go to latest (#928) * update go to latest * Update go to 1.20.4 to match ltsr * Trigger build with new base image * manage complete tenant scope for subscriptions (#930) * manage complete tenant scope for subscriptions Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * fix typo Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update packages for twistlock (#931) Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * [ODLM] bump version to 4.1.0 (#939) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * "disconnected" annotation for assessment (#932) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Update ImagePullPolicy to IfNotPresent (#937) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Trigger build with new base image * build(deps): bump google.golang.org/grpc from 1.48.0 to 1.53.0 (#942) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.48.0 to 1.53.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.48.0...v1.53.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update go for 4.1 (#943) Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * multiple opbi (#944) Signed-off-by: Allen Li <liyuchen223@gmail.com> * updated dependapot to cover release-ltsr branch (#946) Signed-off-by: Henry Li <henry.h.li@ibm.com> * Compare updated opreq status with latest opreq (#950) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * [ODLM] bump version to 4.2.0 (#959) * build(deps): bump golang from 1.20.5-bullseye to 1.21.0-bullseye (#957) Bumps golang from 1.20.5-bullseye to 1.21.0-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * delete job by using background cascading deletion (#956) * Trigger build with new base image * [4.2] Sort Catalogsource by priority in ODLM (#955) * Sort Catalogsource by priority in ODLM * skip when catalogsource get read error --------- Co-authored-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * handle operator namespace could be optional in OperandRegistry (#963) * fix odlm permission issue due to missing opt ns Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * notfound error condition added Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * ODLM support concurrently reconciling multiple resources (#965) * ODLM supportConcurrent Reconciling Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * reconcile multiple other resources Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * build(deps): bump golang from 1.21.0-bullseye to 1.21.1-bullseye (#966) Bumps golang from 1.21.0-bullseye to 1.21.1-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add OperandBindinfo example into alm-example (#968) * Add OperandBindinfo example into alm-example for validation Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update error msg Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update packages for security vulnerabilities (#969) Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * add ephemeral-storage request to container (#961) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Bump ODLM to v4.3 version (#971) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * revert ODLM back to 4.2.1 and channel v4.2 (#972) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Add the common label to operand Pod (#970) * Add the common label to operand Pod Resolves https://github.ibm.com/IBMPrivateCloud/roadmap/issues/59790 * remove spaces in labels --------- Co-authored-by: Piotr Godowski <Piotr.Godowski@pl.ibm.com> * build(deps): bump golang from 1.21.1-bullseye to 1.21.2-bullseye (#974) Bumps golang from 1.21.1-bullseye to 1.21.2-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Trigger build with new base image * build(deps): bump golang.org/x/net from 0.9.0 to 0.17.0 (#979) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.17.0. - [Commits](golang/net@v0.9.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * list out basic permission need by ODLM (#980) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Add additional explicitly listed permission (#981) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * add finalizers permission (#985) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * build(deps): bump golang from 1.21.2-bullseye to 1.21.3-bullseye (#977) Bumps golang from 1.21.2-bullseye to 1.21.3-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * set OwnerReference for resources created by OperandRequest (#983) * set OwnerReference for resources created by OperandRequest Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * fix lint issue Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1 (#987) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.57.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.57.0...v1.57.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Trigger build with new base image * updated Makefile to generate proper CSV (#988) * fixed make manifests for OperandConfig CRD - to have preserve unknown fields for ConfigService.spec Signed-off-by: Henry H Li <henry.h.li@ibm.com> * regenerated deepcopy Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added make kustomize Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added make run-bundle and make cleanup-bundle - updated related make targets for generating proper bundle CSV - yq automatically added indentation to CSV downgraded operator sdk version to v1.29.0 - because hitting same issue as cs-operator operator-framework/operator-sdk#6584 Signed-off-by: Henry H Li <henry.h.li@ibm.com> * changed tests to use ExtensionWithMarker type Signed-off-by: Henry H Li <henry.h.li@ibm.com> --------- Signed-off-by: Henry H Li <henry.h.li@ibm.com> * fix for failing to list packagemanifests resource (#989) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Add value reference in OperandConfig (#990) * Add value reference in OperandConfig Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Add generic object value reference Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Remove unused code Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update test case for Value Reference in Template Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update grpc pkg (#991) * Add support for sharing Route data via ConfigMap with OperandBindInfo (#992) * renamed SecretConfigmap type to Bindable - because OperandConfig will be extended to handle more than just Secrets and Configmaps Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added support to OperandBindInfo for route data - conditionally does it if Route API exists Signed-off-by: Henry H Li <henry.h.li@ibm.com> * removed unused routeKind variable Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added restConfig to Reconciler for dependency injection when testing Signed-off-by: Henry H Li <henry.h.li@ibm.com> * fixed issue with controller always adding route bindable to OperandBindInfo because Route type was a struct and not a point, so could not be nil Signed-off-by: Henry H Li <henry.h.li@ibm.com> --------- Signed-off-by: Henry H Li <henry.h.li@ibm.com> * Add support for sharing Service data via ConfigMap with OperandBindInfo (#993) * added new type ServiceData as a Bindable Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added Service data copying to OperandBindInfo Signed-off-by: Henry H Li <henry.h.li@ibm.com> * fixed incorrect comment referring to Route when copying Service Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added missing error handling when executing jsonpath parsing Signed-off-by: Henry H Li <henry.h.li@ibm.com> * fixed sanitized service data value concatenating across multiple keys by re-initializing trueValue for each key in service datax Signed-off-by: Henry H Li <henry.h.li@ibm.com> --------- Signed-off-by: Henry H Li <henry.h.li@ibm.com> * Support jsonpath in OperandConfig value reference (#994) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Bump ODLM to 4.2.2 (#998) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * allow to add multiple owners to cm/secret (#999) * allow to add multiple owners to cm/secret Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * split the line to reduce its length Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Enhance error handling for uninstall procedure (#1002) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Skip reconciling CRs for operators marked as no-op (#1001) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump golang from 1.21.3-bullseye to 1.21.5-bullseye (#1004) Bumps golang from 1.21.3-bullseye to 1.21.5-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ODLM to 4.2.3 for 4.4 release (#1005) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Trigger build with new base image * Allow resources to be updated by ODLM when control label is specified (#1010) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Bump ODLM to 4.3.0 for CS 4.5 release (#1011) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Trigger build with new base image * build(deps): bump golang from 1.21.5-bullseye to 1.22.0-bullseye (#1012) Bumps golang from 1.21.5-bullseye to 1.22.0-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improve logs on Catalog discovery (#1015) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Reduce CPU and Memory usage (#1009) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Prioritize the Catalog which ODLM is deployed from (#1016) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Read Object from k8s API directly instead of cache to avoid getting outdated object (#1017) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Skip OperandRequest for OperandBindinfo if the OperandRequest is in the deletion status (#1018) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump golang from 1.22.0-bullseye to 1.22.1-bullseye (#1021) Bumps golang from 1.22.0-bullseye to 1.22.1-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add CertManager and AuditLogging CR cluster permission to ODLM (#1023) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * updated base image to explicitly use docker.io instead of implied (#1026) Signed-off-by: Henry H Li <henry.h.li@ibm.com> * Introduce OwnReference API (#1025) * Introduce OwnReference API Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Enable OwnerReference API for resources created by OperandConfig Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#1024) Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Enable deep JSON merging for Kubernetes resources when updating them (#1019) * enable deep json merge for k8s resources Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * fix deep merge for resource spec Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * merge for all resrources type Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * each changed object updated once Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * compare whole resrouces file instead of spec section Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * set ownerreferences Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * ensure ann, label and set owner on updated resrouce Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * fix deep copy (#1029) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * scaffolded OperatorConfig API (#1027) * scaffolded OperatorConfig API Signed-off-by: Henry H Li <henry.h.li@ibm.com> * changed operatorconfig controller to use NewODLMOperator type Signed-off-by: Henry H Li <henry.h.li@ibm.com> * renamed operatorconfig reconciler to just Reconciler Signed-off-by: Henry H Li <henry.h.li@ibm.com> --------- Signed-off-by: Henry H Li <henry.h.li@ibm.com> * Operatorconfig controller (#1030) * added new fields to OperatorConfigSpec type - for configuring replicas, affinity, and topologySpreadConstraints Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added OperatorConfig controller - to apply configuration from OperatorConfig onto CSVs updated Operator type in OperandRegistry to include OperatorConfig name - this assumes OperatorConfigs are in the same namespace as registry, just like OperandConfig updated RBAC to include OperatorConfig Signed-off-by: Henry H Li <henry.h.li@ibm.com> * added preserve unknown fields to ServiceOperatorConfig type Signed-off-by: Henry H Li <henry.h.li@ibm.com> * go mod tidy Signed-off-by: Henry H Li <henry.h.li@ibm.com> * fixed go imports formatting Signed-off-by: Henry H Li <henry.h.li@ibm.com> * fixed incorrect comment description for GetConfigForOperator Signed-off-by: Henry H Li <henry.h.li@ibm.com> --------- Signed-off-by: Henry H Li <henry.h.li@ibm.com> * Support uninstallation on intra-dependency (#1028) * Support uninstallation on intra-dependency Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update manifest Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Trigger build with new base image * Improve UX experience for OperatorConfig (#1033) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump golang from 1.22.1-bullseye to 1.22.2-bullseye (#1031) Bumps golang from 1.22.1-bullseye to 1.22.2-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Trigger build with new base image * Update OperatorConfig reconciliation and improve error handling (#1034) * Update OperatorConfig reconciliation and improve error handling Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Requeue request every three hours for sync Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * drop unnecessary else statement Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Set channel annotation for no-op equal to spec channel when spec channel is lower (#1035) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Bump version to 4.3.1 for 4.6.1 (#1038) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * overwrite the array in deep merge logic (#1037) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Retrigger build after prow fix * Trigger build with new base image * remove discontinued quay configuration (#1042) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Fix nil pointer issue when operator is not found in OperandRegistry (#1040) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update pkgs for security vulnerabilities for 4.6.2 (#1043) * update net package for twistlock Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * update apimachinery for whitesource Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * update controller runtime Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * change controller runtime versions Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * revert to 24.17 Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> --------- Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * Update ODLM module to match major version v4 (#1039) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump golang from 1.22.2-bullseye to 1.22.3-bullseye (#1044) Bumps golang from 1.22.2-bullseye to 1.22.3-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ODLM to 4.3.2 for 4.6.3 (#1047) * Bump ODLM to 4.3.2 for 4.6.3 Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Rollback package setup-envtest due to issue kubernetes-sigs/controller-runtime#2838 Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Only discover catalog for an operator when it has been requested in OperandRequest (#1048) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * reset the phase of each operator in opreq (#1049) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Skip catalog discover when operator is not found in OperandRegistry (#1050) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * reconcile k8s resource in parallel and with retry logic (#1053) * reconcile k8s resource in parallel and with retry logic Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Separate variables for chunkSize and Retry number Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * build(deps): bump golang from 1.22.3-bullseye to 1.22.4-bullseye (#1051) Bumps golang from 1.22.3-bullseye to 1.22.4-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Find CSVs by label for an operator, to ensure deleting all the CSVs for a specific subscription (#1055) * Find CSVs by label for an operator, to ensure deleting all the CSVs for a specific subscription Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update test case Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Raise error when there is no catalog found for a operator (#1054) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Refactor members and services status update (#1056) * Refactor members and services status update Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Update typo in log message Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Re-construct if condition for better code readability Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Bump version to 4.3.3 for SC2 4.6.4 (#1058) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Bump version to 4.3.4 for SC2 4.6.5 (#1064) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Trigger build with new base image * Trigger build with new base image * Trigger build with new base image * trigger build * build(deps): bump golang from 1.22.4-bullseye to 1.22.5-bullseye (#1063) Bumps golang from 1.22.4-bullseye to 1.22.5-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Clean redundant CSV in service ns during the migration (#1065) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Find semantic versioning from channel (#1066) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * add securityContext .seccompProfile field (#1071) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Bump version to 4.3.5 for SC2 4.6.6 (#1074) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Trigger build with new base image * Trigger build with new base image * update golangci version to 1.60.x (#1076) * update golangci version to 1.60.x Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * fix lint issues Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Bump golang verison in Dockerfile Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * fix lint issue Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * remove ltsr branch from dependabot.yml (#1075) * updated base image to ubi9 (#1077) Signed-off-by: Henry Li <henry.h.li@ibm.com> * added feature to handle user managed operators (BYO) (#1078) * fixed make bundle-manifests to check for yq first Signed-off-by: Henry Li <henry.h.li@ibm.com> * updated controller-gen to v0.14.0 Signed-off-by: Henry Li <henry.h.li@ibm.com> * added UserManaged field to OperandRegistry - for BYO scenario Signed-off-by: Henry Li <henry.h.li@ibm.com> * 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 <henry.h.li@ibm.com> * updated user managed logic to properly cleanup Signed-off-by: Henry Li <henry.h.li@ibm.com> * increase lint timeout to 300s Signed-off-by: Henry Li <henry.h.li@ibm.com> * fixed test regression by adding opreq-control label Signed-off-by: Henry Li <henry.h.li@ibm.com> * 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 <henry.h.li@ibm.com> * updated DeleteRedundantCSV to ignore any CSVs where olm.copiedFrom label exists Signed-off-by: Henry Li <henry.h.li@ibm.com> --------- Signed-off-by: Henry Li <henry.h.li@ibm.com> * implement channel fallback in catalog discovery (#1079) * implement channel fallback in catalog discovery Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * fix lint issue Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * add packagemanifest into scheme Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Bump version to 4.3.6 for SC2 4.6.7 (#1082) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Trigger build with new base image * Add packagemanifest CRD in test ENV (#1080) * Add packagemanifest CRD in test ENV Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update test cases Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Revert the host back to default value (#1083) * revert host back to default in route Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * fix go format Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * build(deps): bump golang from 1.23.0-bullseye to 1.23.1-bullseye (#1081) Bumps golang from 1.23.0-bullseye to 1.23.1-bullseye. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Use PackageName name as the name of subscription (#1084) * use pkg name as the name of subscription Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * fix for test error Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Enhance ODLM create/update logic by adding hash values (#1086) * hash comparison and deep merge all the resources Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update hash number Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Add optionalFields into OperandConfig, to conditionally prune fields based on matchExpressions (#1085) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * omit empty value (#1087) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Bump version to 4.3.7 fo SC2 4.6.8 (#1089) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Revert "build(deps): bump golang from 1.23.0-bullseye to 1.23.1-bullseye (#1081)" (#1090) This reverts commit 6baae18. * Trigger build with new base image * Test with bookworm golang (#1091) * label length limitation (#1092) * label length limitation Signed-off-by: Allen Li <liyuchen223@gmail.com> * remove string conversion Signed-off-by: Allen Li <liyuchen223@gmail.com> * update var name Signed-off-by: Allen Li <liyuchen223@gmail.com> * use annotations instead of label Signed-off-by: Allen Li <liyuchen223@gmail.com> --------- Signed-off-by: Allen Li <liyuchen223@gmail.com> * fix typo in utils (#1093) Signed-off-by: Allen Li <liyuchen223@gmail.com> * ensure label within length limitation (#1094) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Delete k8s resources by checking the label from OperandConfig (#1095) * delete k8s resources by checking from OperandConfig Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * new label condition check Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Bump version to 4.3.8 fo SC2 4.6.9 (#1096) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Trigger build with new base image * Tolerate both opt.channel and opt.FallbackChannels for one operator (#1098) * Reconciliation will tolerate both opt.channel and opt.FallbackChannels for one operator Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * trigger reconciliation when subscription annotation is updated Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * add cluster permission check for v3 resources (#1097) Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Discover private CatalogSource only if no catalog cluster permission exists (#1099) * read catalogsource permission only for non-private ctrsource Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * add test case for checkResAuth function in manager.go Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * add create mock test or ODLMoperator Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * update test case Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * Use SelfSubjectAccessReview to check ODLM's permission on getting catalog (#1100) Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * Trigger build with new base image * Bump version to 4.3.9 for CS 4.6.10 (#1102) Signed-off-by: Allen Li <liyuchen223@gmail.com> * Trigger build with new base image * Trigger build with new base image * Check if Object is updated except certain label and annotations (#1104) * Check if Object is updated except certain label and annotations Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * update test case to include more checks Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * correct log info Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * use Reader instead of Client to get ConfigMap/Secret that are referred Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> * add required OLM metadata (#1103) * add required OLM metadata ..as defined in https://docs.redhat.com/en/documentation/red_hat_software_certification/2024/html-single/red_hat_openshift_software_certification_policy_guide/index#con-operator-requirements_openshift-sw-cert-policy-products-managed and required by RH Certification * update the base file --------- Co-authored-by: Piotr Godowski <Piotr.Godowski@pl.ibm.com> * Trigger build with new base image * update net to 0.33 (#1107) Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * prototype ODLM w/o olm (#1105) * poc for demo Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * translate csv to deployment Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * facilitate test builds Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * build debugging Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * debug statement Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * bump version Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * debug statement Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * debug statement Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * troubleshooting Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * troubleshooting Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * troubleshooting Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * preliminary changes for odlm delete operands Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * remove test files from noolm controller Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * refactor some cleanup code Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> --------- Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * Helm chart for ODLM (#1106) * helm init Signed-off-by: Allen Li <liyuchen223@gmail.com> * resource init Signed-off-by: Allen Li <liyuchen223@gmail.com> * add olm role and rolebinding Signed-off-by: Allen Li <liyuchen223@gmail.com> * update namespaces Signed-off-by: Allen Li <liyuchen223@gmail.com> * add comment Signed-off-by: Allen Li <liyuchen223@gmail.com> * add comment Signed-off-by: Allen Li <liyuchen223@gmail.com> * update imagepullsecret Signed-off-by: Allen Li <liyuchen223@gmail.com> * typo Signed-off-by: Allen Li <liyuchen223@gmail.com> * remove operandregistry and operadconfig Signed-off-by: Allen Li <liyuchen223@gmail.com> * update filename and image Signed-off-by: Allen Li <liyuchen223@gmail.com> * add namespace field in sa, and update watch namespace Signed-off-by: Allen Li <liyuchen223@gmail.com> * typo in ibm-entitlement-key Signed-off-by: Allen Li <liyuchen223@gmail.com> * update watchNamespace Signed-off-by: Allen Li <liyuchen223@gmail.com> * add namespace to rolebinding Signed-off-by: Allen Li <liyuchen223@gmail.com> --------- Signed-off-by: Allen Li <liyuchen223@gmail.com> * update image tag and chart name (#1109) * update image tag Signed-off-by: Allen Li <liyuchen223@gmail.com> * add operatorVersion to values Signed-off-by: Allen Li <liyuchen223@gmail.com> --------- Signed-off-by: Allen Li <liyuchen223@gmail.com> * refactor no olm controller code to handle cleanup on operandrequest deletion (#1108) * refactor no olm controller code to handle deletion Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * cleanup Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * update build params for testing Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * update controller to watch configmap changes Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * add watched by odlm label Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * add debugging statements Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * more debugging logs Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * more debug statements Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * remove user managed condition Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * debug statements Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * disable, edit debugging statements Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> --------- Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> * bump up odlm version for CD (#1111) Signed-off-by: Allen Li <liyuchen223@gmail.com> * updated chart to work with CICD automation (#1112) Signed-off-by: Henry Li <henry.h.li@ibm.com> * updated chart to use global values to meet CPD spec (#1113) Signed-off-by: Henry Li <henry.h.li@ibm.com> * Trigger build with new base image * specify operator namespace in rolebinding (#1117) * Update OWNERS (#1116) * Enhance cleanup of OperandRequest for non-OLM case (#1114) * delete OperandRequest ConfigMap when uninstall operator condition true Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * fix lint error Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * removing get deployment function Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * add prefix and tracker label for opreq configmap Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * clean up debugging log Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> * clean up function not in use Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> --------- Signed-off-by: Daniel Fan <fanyuchensx@gmail.com> Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Ben Luzarraga <luzarragaben@ibm.com> Signed-off-by: Allen Li <liyuchen223@gmail.com> Signed-off-by: Ben Luzarraga <luzarragaben@gmail.com> Signed-off-by: Henry Li <henry.h.li@ibm.com> Signed-off-by: Henry H Li <henry.h.li@ibm.com> Co-authored-by: Daniel Fan <fanyuchensx@gmail.com> Co-authored-by: Travis CI User <travis@example.org> Co-authored-by: YuChen Shen <59578388+YCShen1010@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Allen Li <46284272+qpdpQ@users.noreply.github.com> Co-authored-by: Henry Li <zbhenryli@gmail.com> Co-authored-by: Piotr Godowski <piotr.godowski@gmail.com> Co-authored-by: Piotr Godowski <Piotr.Godowski@pl.ibm.com> Co-authored-by: Adam Shank <42580017+ashank07@users.noreply.github.com> Co-authored-by: Jeremy Cheng <81793294+Jeremy-Cheng-stack@users.noreply.github.com>
for issue: https://github.ibm.com/ibmprivatecloud/roadmap/issues/54725
ODLM will prioritize CatalogSource for operator based on CatalogSource
.spec.priority
provided from OLM.Current sequence of sorting order:
Test
ibm-operator-catalog
inopenshift-marketplace
ns and give.spec.priority
to10
, and same time createcloud-native-postgresql-catalog
cloud-native-postgresql
, the catalogsource isibm-operator-catalog
as priority value 10 > 0(default)