-
Notifications
You must be signed in to change notification settings - Fork 2k
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 stanza interpolation limitations #7221
Comments
Hi! Maybe this doens't fit in this issue exactly, but I found out a similar problem when using interpolation in the service name at the group level.
|
Pretty sure this problem fits here, but it's a little annoying to pass configuration to a Below is configuration snippet for service, and the output on envoy connect container. service {
name = "api"
tags = ["global","app"]
port = "9091"
connect {
sidecar_service {
proxy {
local_service_address = "${attr.unique.network.ip-address}"
}
}
}
}
|
Can confirm it does. I just chased my own tail a bit with the following "service" stanza:
And got: Replacing |
Another case of this looks to be that the |
Looks like exactly the same as @trilom issue. Thanks all! |
I stumbled upon this when trying to expose the envoy prometheus metrics - interpolation does not work for proxy task tags. (Is there a way to do this without exposing a dynamic port on the host? I can't really find any docs on this.) If I set prometheus tags on the proxy task I can scrape metrics, but when using the host interface I have to (?) interpolate the host ip and dynamic port. Here's a non-working excerpt:
|
Hi @rickardrosen. This is not directly related with this issue, but I'm trying to get a PR merged in prometheus to be able to get relabel info for connect exposeConfig in here. I think that would solve this issue for you as prometheus would be able to use the dynamic port. |
This PR enables job submitters to use interpolation in the connect block of jobs making use of consul connect. Before, only the name of the connect service would be interpolated, and only for a few select identifiers related to the job itself (#6853). Now, all connect fields can be interpolated using the full spectrum of runtime parameters. Note that the service name is interpolated at job-submission time, and cannot make use of values known only at runtime. Fixes #7221
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
v0.10.4
Issue
Interpolation is still limited within
group.service.connect
stanzas because the majority of interpolation is done at the task level by theTaskEnv
struct.Hopefully this can be fixed without HCL2 (#7220).
Reproduction steps
Run jobspec from gist: https://gist.github.com/schmichael/dfdb9984c549ff4f5c65082f24fdf874
Observe that in
nomad alloc status
output the meta var is interpolated in the service name, but not in anything Connect related:The text was updated successfully, but these errors were encountered: