openstack-k8s-operators / horizon-operator

Apache License 2.0
1 stars 26 forks source link

Improve automated support for local webhooks #380

Closed abays closed 3 weeks ago

abays commented 3 weeks ago

Reworks make run-with-webhook target to trap SIGINT and SIGTERM so as to call clean_local_webhook.sh in such a scenario. This way, a user can run the operator locally and automatically have the local webhooks removed when they finish running the operator via ctrl+c.

Also creates a backup of any existing OLM CSV for the operator while preparing to run the operator locally with webhooks, if the current CSV has a deployment replicas count greater than zero and/or there are webhookdefinitions present. That backup can then be easily re-applied to restore OLM CSV defaults via oc patch by the user at their convenience.

openshift-ci[bot] commented 3 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, bshephar

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: - ~~[OWNERS](https://github.com/openstack-k8s-operators/horizon-operator/blob/main/OWNERS)~~ [abays,bshephar] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment