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

Ensure HTTP endpoints are accessible outside the cluster #118

Closed
everettraven opened this issue Jul 17, 2023 · 11 comments · Fixed by #209
Closed

Ensure HTTP endpoints are accessible outside the cluster #118

everettraven opened this issue Jul 17, 2023 · 11 comments · Fixed by #209
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@everettraven
Copy link
Collaborator

everettraven commented Jul 17, 2023

Following #113 we should ensure that the necessary HTTP endpoints for getting catalog contents are accessible from outside the cluster. A user shouldn't have to perform any magic to curl the endpoint containing a Catalog's contents.

In essence, a user should be able to fetch the catalog content via the command line by:

  • Running kubectl get catalog {catalogName} -o yaml to fetch Catalog details
  • Running curl {Catalog.Status.contentURL} to fetch all the contents of the Catalog
@anik120
Copy link
Collaborator

anik120 commented Jul 18, 2023

This to me reads more as "write a kubectl plugin that connects to the service exposed by the controller to fetch and explore catalog content on cluster (get packages, get bundle should be sufficient to begin with). Unless there's a different way of solving this, we should probably modify the issue to be more explicit about what needs to be done.

@everettraven
Copy link
Collaborator Author

everettraven commented Jul 18, 2023

I was more so trying to convey that a user should be able to do a kubectl get catalog operatorhubio -o yaml and take the URL from the Catalog.Status and put it into a curl command like curl {catalog.status.url} and receive the catalog contents. No kubectl plugin required at this stage IMO

@anik120
Copy link
Collaborator

anik120 commented Jul 19, 2023

I see, we're talking Ingress here then. That's fine.

@joelanford
Copy link
Member

What's proposed is likely not possible. The catalog's status.contentURL field will very likely be an https URL whose host:port is resolvable/routable only inside the cluster.

My assumption would be that we would document standard ways of exposing a Service's endpoints outside the cluster and then the curl command would use whatever endpoint was exposed. Options would include:

  • Using ingress. In this case, the URL that is curled would be resolvable by a DNS resolver outside the cluster, and then the ingress would reverse proxy to the underlying service.
  • Using a NodePort service. In this case, the URL that is curled would be to a cluster host running kube-proxy. The port would be a high-numbered port, likely not the same as the service port.

@everettraven
Copy link
Collaborator Author

What's proposed is likely not possible. The catalog's status.contentURL field will very likely be an https URL whose host:port is resolvable/routable only inside the cluster.
My assumption would be that we would document standard ways of exposing a Service's endpoints outside the cluster and then the curl command would use whatever endpoint was exposed

That's a fair assumption. I didn't think too far into if this approach is possible, but if the way to go about this is to document a standard way to access the service's endpoints using something like curl that is fine as well

@everettraven
Copy link
Collaborator Author

/assign @rashmigottipati

@anik120 anik120 added this to the v0.9.0 milestone Oct 19, 2023
@anik120 anik120 modified the milestones: v0.9.0, v0.10.0 Oct 27, 2023
@rashmigottipati
Copy link
Member

Can close this as it's completed via #209

@joelanford
Copy link
Member

Thanks for the callout @rashmigottipati! Feel free to close directly when you see stuff like this.

And also (you're probably aware, but I know its easy to forget) there's some GH syntax you can put in PR descriptions/comments that will get GH to do this for you automatically: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue

@rashmigottipati
Copy link
Member

@joelanford yeah, my bad, I forgot linking the GH issue in the PR description when I'd created it but added it after the PR was merged, so I don't think it was able to pick it up. 😅 And I was unable to close it directly as I don't see the "Close" button, I think it's because I am not a maintainer on this project.

@joelanford
Copy link
Member

joelanford commented Nov 10, 2023

I think it's because I am not a maintainer on this project.

Ah! Well we should fix that!

EDIT: Done!

@rashmigottipati
Copy link
Member

@joelanford thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants