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

connect sidecar add healthcheck in annotation #146

Closed
Veres72 opened this issue Oct 8, 2019 · 2 comments
Closed

connect sidecar add healthcheck in annotation #146

Veres72 opened this issue Oct 8, 2019 · 2 comments
Labels
area/connect Related to Connect service mesh, e.g. injection theme/health-checks About Consul health checking type/enhancement New feature or request waiting-reply Waiting on the issue creator for a response before taking further action

Comments

@Veres72
Copy link

Veres72 commented Oct 8, 2019

Now, consul sidecar check services through ip:port. If service listening port, but don't have success probe, consul direct traffic in the dead pod.
Add some annotations such as:
"consul.hashicorp.com/service-check": "http://127.0.0.1:8080/ping/serice/alive':10s"

May be here add checks

services {
id = "${POD_NAME}-{{ .ServiceName }}"
name = "{{ .ServiceName }}"
address = "${POD_IP}"
port = {{ .ServicePort }}
{{- if .Tags}}
tags = {{.Tags}}
{{- end}}
{{- if .Meta}}
meta = {
{{- range $key, $value := .Meta }}
{{$key}} = "{{$value}}"
{{- end }}
}
{{- end}}
}
EOF

example:

  checks {
    name = "{{ .ServiceName }} check"
    http = "{{ .checkPath }}"
    interval = "{{ .checkIntervas }}"
  }
@lkysow lkysow added the type/enhancement New feature or request label Oct 9, 2019
@lkysow lkysow added theme/health-checks About Consul health checking area/connect Related to Connect service mesh, e.g. injection labels Oct 29, 2019
@lkysow
Copy link
Member

lkysow commented Nov 28, 2020

Hi all, with the release of consul-helm 0.26.0 we support syncing kube readiness status to Consul. So instead of setting checks via annotations in the PR can you try creating kube readiness probes? That way Consul and Kube will agree on the readiness status.

If that works we will close this issue, however if there's a reason that that won't work please let us know.

@lkysow lkysow added the waiting-reply Waiting on the issue creator for a response before taking further action label Nov 28, 2020
@Veres72
Copy link
Author

Veres72 commented Nov 29, 2020

Hi.
Unfortunately I don't have opportunity to check it. I think you can close a issue.

@lkysow lkysow closed this as completed Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connect Related to Connect service mesh, e.g. injection theme/health-checks About Consul health checking type/enhancement New feature or request waiting-reply Waiting on the issue creator for a response before taking further action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants