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

feature: support for checking against HTTP status code #183

Open
MrPeacockNLB opened this issue Jan 29, 2024 · 0 comments
Open

feature: support for checking against HTTP status code #183

MrPeacockNLB opened this issue Jan 29, 2024 · 0 comments

Comments

@MrPeacockNLB
Copy link

Description

The integrated healthcheck should be able to check a HTTP a status code.

E.g. we are deploying an K3D cluster inside out workspace. The healthcheck is already green but user facing a 404 error page from kubernetes as the app is not up and running. Checking against a status code 200 should solve this.

Setting a explicit statuscode should change the default checking.

resource "coder_app" "code-server" {
  agent_id     = coder_agent.dev.id
  slug         = "code-server"
  display_name = "VS Code"
  icon         = "${data.coder_workspace.me.access_url}/icon/code.svg"
  url          = "http://localhost:13337"
  share        = "owner"
  subdomain    = false
  healthcheck {
    url       = "http://localhost:13337/healthz"
    interval  = 5
    threshold = 6
    statuscode = 200
  }
}

Expected Behavior

Button should be enabled when application is ready and not when kubernetes cluster has started. If a statuscode 200 is set then the button gets enabled when the application is ready.

Actual Behavior

As soon kubernetes cluster is ready the healtcheck is green and buttons are enabled

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

No branches or pull requests

1 participant