Skip to content

Fix run/debug locally #486

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

Merged
merged 1 commit into from
Jul 12, 2021
Merged

Fix run/debug locally #486

merged 1 commit into from
Jul 12, 2021

Conversation

amisevsk
Copy link
Collaborator

@amisevsk amisevsk commented Jul 9, 2021

What does this PR do?

PR #474 moved the conversion webhooks to the controller deployment, which requires the controller deployment to read mounted secrets to get the correct TLS cert.

For make run and make debug to work locally, we need to grab this secret and store its keys as files on the local disk as if it was a mounted secret (stored in /tmp/k8s-webhook-server/serving-certs/).

Note that since conversion webhooks are now in the main deployment, conversion won't work when running locally.

What issues does this PR fix or reference?

Make run/debug broken

Is it tested? How?

make run

make debug

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v7-devworkspaces-operator-e2e, v7-devworkspace-happy-path to trigger)
    • v7-devworkspaces-operator-e2e: DevWorkspace e2e test
    • v7-devworkspace-happy-path: DevWorkspace e2e test

Fix make run and make debug by grabbing the tls certs used by the
controller deployment and storing them in the expected path
(k8s-webhook-server/serving-certs/) on the local machine.

Since conversion webhooks are handled by the controller, they will not
work when running/debugging locally.

Signed-off-by: Angel Misevski <[email protected]>
@amisevsk amisevsk requested review from sleshchenko and JPinkney July 9, 2021 19:31
@openshift-ci openshift-ci bot added the approved label Jul 9, 2021
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.

I haven't tested but LGTM

@sleshchenko
Copy link
Member

/test v7-devworkspaces-operator-e2e, v7-devworkspace-happy-path

@openshift-ci
Copy link

openshift-ci bot commented Jul 12, 2021

@amisevsk: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/v7-devworkspace-happy-path 019a148 link /test v7-devworkspace-happy-path

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.

@openshift-ci
Copy link

openshift-ci bot commented Jul 12, 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

@amisevsk amisevsk merged commit 90435bf into devfile:main Jul 12, 2021
@amisevsk amisevsk deleted the fix-debug branch July 12, 2021 21:41
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.

3 participants