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

feat: accessible workspace healthz endpoint #1119

Merged
merged 8 commits into from
Oct 11, 2021

Conversation

sparkoo
Copy link
Member

@sparkoo sparkoo commented Oct 1, 2021

What does this PR do?

Makes /healthz path of main workspace endpoint accessible from the outside. DevWorkspace Operator needs this to check whether workspace is alive.

TODO:

  • Write tests

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#20481

How to test this PR?

latest image here --> quay.io/mvala/che-operator:gh20481-workspaceHealthzEndpoint

  1. deploy with devworkspaces on openshift
  2. start any workspace
  3. copy direct workspace url kubectl get dw -n <user-namespace>
  4. append /healthz and try to curl it. You should get 404 response. That is ok, because Theia does not actually implement that endpoint. In case this PR is not working, you would be redirected to openshift login page.
  5. try to curl any other workspace url, you should be redirected to openshift login page. Only <main-url>/healthz must be accessible.
chectl server:deploy \
     --installer operator \
     --platform openshift \
     --che-operator-image quay.io/mvala/che-operator:gh20481-workspaceHealthzEndpoint \
     --workspace-engine=dev-workspace

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@sparkoo
Copy link
Member Author

sparkoo commented Oct 1, 2021

/retest

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 understand nothing in that area, so I just let other reviewers to review )

controllers/devworkspace/solver/che_routing.go Outdated Show resolved Hide resolved
@sparkoo
Copy link
Member Author

sparkoo commented Oct 4, 2021

/retest

@sparkoo sparkoo force-pushed the gh20481-workspaceHealthzEndpoint branch from 3b3b7ef to 0aa3229 Compare October 6, 2021 16:43
@openshift-ci openshift-ci bot removed the lgtm label Oct 6, 2021
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
Signed-off-by: Michal Vala <mvala@redhat.com>
@sparkoo sparkoo force-pushed the gh20481-workspaceHealthzEndpoint branch from ae668c2 to 6b747bf Compare October 7, 2021 18:53
@nickboldt
Copy link
Contributor

nickboldt commented Oct 8, 2021

reminder: if this is a blocker for 2.12 (https://issues.redhat.com/browse/CRW-2360), need this in the 7.36.x branch.

# Conflicts:
#	controllers/devworkspace/solver/che_routing.go
#	controllers/devworkspace/solver/che_routing_test.go
@sparkoo
Copy link
Member Author

sparkoo commented Oct 11, 2021

/retest

@sparkoo sparkoo requested a review from metlos October 11, 2021 09:30
@openshift-ci
Copy link

openshift-ci bot commented Oct 11, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: metlos, sparkoo, tolusha

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

@sparkoo sparkoo merged commit d104845 into eclipse-che:main Oct 11, 2021
@sparkoo sparkoo deleted the gh20481-workspaceHealthzEndpoint branch October 11, 2021 17:22
@che-bot che-bot added this to the 7.38 milestone Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants