Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Conversation

sadlerap
Copy link
Contributor

Changes

This introduces a new flag, --olm-descriptors, that toggles whether olm descriptors are used as binding sources. The default value is false, i.e. olm descriptors are not checked by default. To re-enable, run the following:

kubectl patch deployments.apps -n service-binding-operator service-binding-operator --type=json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--olm-descriptor"}]'

There's probably some more test coverage I need to do for this, but I'd like to see how performance looks.

/kind enhancement

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs
    included if any changes are user facing
  • Tests
    included if any functionality added or changed. For bugfixes please include tests that can catch regressions
  • All acceptance test scenarios included in the PR which verifies a bugfix or a requested feature reported by a non-member are tagged with @external-feedback tag.
  • Follows the commit message standard

@openshift-ci openshift-ci bot added the kind/enhancement New feature or request label Sep 29, 2022
@openshift-ci openshift-ci bot requested review from baijum and pmacik September 29, 2022 18:22
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 29, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sadlerap by writing /assign @sadlerap in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sadlerap
Copy link
Contributor Author

/test 4.10-performance-reduced
/test 4.11-performance-reduced

@sadlerap
Copy link
Contributor Author

/test performance

@sadlerap sadlerap force-pushed the disable-olm-descriptors branch from c11d97d to 69b4798 Compare September 29, 2022 19:49
@sadlerap
Copy link
Contributor Author

/test 4.10-performance-reduced
/test 4.11-performance-reduced
/test performance

Signed-off-by: Andy Sadler <[email protected]>
@sadlerap sadlerap force-pushed the disable-olm-descriptors branch from 60c1cab to b32fec9 Compare September 30, 2022 00:14
@sadlerap
Copy link
Contributor Author

/test 4.10-performance-reduced
/test 4.11-performance-reduced
/test performance

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 30, 2022

@sadlerap: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.11-acceptance b32fec9 link true /test 4.11-acceptance
ci/prow/4.10-acceptance b32fec9 link true /test 4.10-acceptance
ci/prow/4.12-acceptance b32fec9 link true /test 4.12-acceptance
ci/prow/4.9-acceptance b32fec9 link true /test 4.9-acceptance

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@pmacik
Copy link
Contributor

pmacik commented Sep 30, 2022

/lgtm

@sadlerap The OpenShift acceptance tests fail because the OLM descriptors are not explicitelly enabled for them and only the OLM descriptor related tests fails.

I have identified those scenarios and sent a PR (#1245) to mark them with the @olm-descriptors tag so we can disable them on demand (openshift/release/pull/32750) or deprecate it later.

With the second PR I have temporarily disable them because I cannot use the code to patch SBO deployment to enable olm descriptors on SBO like you do until this PR is actually merged. (otherwise other PR's CI would fail complaining that the flag is invalid)

Once the above PRs are merged to the respecive repos, you can rebase your PR and the OpenShift acceptance tests should pass again.

kubectl describe deployments.apps -n operators service-binding-operator
echo "##[endgroup]"
echo "##[group]Patch operator"
kubectl patch deployments.apps -n operators service-binding-operator --type=json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--olm-descriptor"}]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sadlerap are you sure this change to the deployment is not reverted back by the OLM immediatelly after it is patched?

flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.BoolVar(&enableOLMDescriptor, "olm-descriptor", false,
Copy link
Contributor

@pmacik pmacik Sep 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have doubts with the approach of using CLI parameters to set this flag.

What about using a ConfigMap to set/store such flag that SBO would look for at boot time and use the values from the CM. If the CM does not exist, SBO would create it automatically with the default values.

This allows setting this kind of flags at install time without the need to change or patch the actual Deployment objects (like in case of having a CLI parameter for --olm-descriptors). The installation would then be like... Create a ConfigMap in the operator's namespace of a particular name with enableOLMDescriptor: true data in it (if users want to enable it) or don't do it as before to keep it disabled by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure I like the interface; a ConfigMap probably would work better. Are they the conventional way of providing configuration options for an operator?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is a conventional (a "cloud-native") way in Kubernetes in general.

@pmacik pmacik removed the lgtm label Sep 30, 2022
@sadlerap
Copy link
Contributor Author

/hold

@sadlerap
Copy link
Contributor Author

sadlerap commented Oct 5, 2022

Closing in favor of #1251.

@sadlerap sadlerap closed this Oct 5, 2022
@sadlerap sadlerap deleted the disable-olm-descriptors branch October 5, 2022 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants