Skip to content

Redirect /metrics and /healthz to root in staging#153

Merged
projectLewis merged 2 commits intomasterfrom
update-ingress
May 9, 2020
Merged

Redirect /metrics and /healthz to root in staging#153
projectLewis merged 2 commits intomasterfrom
update-ingress

Conversation

@aaron-junot
Copy link
Copy Markdown
Member

I don't know if this will work, but I suspect it will. The goal is to make the /metrics and /healthz endpoints only available within the cluster. If someone attempts to access them from outside the cluster, they'll be redirected to / instead.

If this works in staging, I'll follow up with another PR to update production.

Copy link
Copy Markdown
Collaborator

@projectLewis projectLewis left a comment

Choose a reason for hiding this comment

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

Verified this change is under the staging directory, and previous comment has been updated.

@projectLewis projectLewis merged commit dd988b9 into master May 9, 2020
@aaron-junot aaron-junot deleted the update-ingress branch May 9, 2020 03:34
@aaron-junot
Copy link
Copy Markdown
Member Author

After merge, it appears this did not work as I can still hit https://resources.staging.operationcode.org/healthz and https://resources.staging.operationcode.org/metrics and I don't get redirected to https://resources.staging.operationcode.org/

I'm not sure what to try next, but we'll have to do something

@aaron-junot
Copy link
Copy Markdown
Member Author

It's very possible that this is just not supported https://www.reddit.com/r/aws/comments/73u365/alb_does_not_support_path_rewriting/

@projectLewis
Copy link
Copy Markdown
Collaborator

The AWS blog says its not supported and suggests using Nginx or a network load balancer.
https://aws.amazon.com/blogs/opensource/network-load-balancer-nginx-ingress-controller-eks/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants