Skip to content
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

Fail controller startup when conflicting webhook definition present #588

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

amisevsk
Copy link
Collaborator

@amisevsk amisevsk commented Sep 9, 2021

What does this PR do?

Check webhooks when starting the controller, and abort startup if the existing webhook configuration points at a different namespace.

What issues does this PR fix or reference?

Closes #585

Is it tested? How?

Try to install operator in two namespaces.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Fail startup of controller if a webhook configuration exists and has a
different clientConfig from the expected one (i.e. points at a service
in a different namespace. This avoids issues of multiple controllers
being installed on the cluster.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

Good enough!
Taking control over existing config requires more effort with hypothetical profit. So, +100 to proceed with it.

@openshift-ci
Copy link

openshift-ci bot commented Sep 10, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amisevsk, JPinkney, sleshchenko

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 [JPinkney,amisevsk,sleshchenko]

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

@sleshchenko
Copy link
Member

/test v8-devworkspace-operator-e2e, v8-che-happy-path

@sleshchenko sleshchenko merged commit 0695055 into devfile:main Sep 10, 2021
@amisevsk amisevsk deleted the check-for-multiple-controllers branch September 10, 2021 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail DWO startup if it detects another one on the cluster
3 participants