You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing Consul helm chart, enable connect inject. And deploy a service by adding the annotation above. By using the Consul catalog API endpoint, we should able to see the reproduced result.
However, the merged code ONLY parses the services tag when running the command sync-catalognot in the controllerinject-connect`.
A possible reasonable solution is to add the following line in control-plane/connect-inject/endpoints_controller.go:1215 to consulTags function:
// consulTags returns tags that should be added to the Consul service and proxy registrations.
func consulTags(pod corev1.Pod) []string {
var tags []string
if raw, ok := pod.Annotations[annotationTags]; ok && raw != "" {
tags = append(tags, parseTags(raw)...)
}
// Redefine parseTags here or move control-plane/catalog/to-consul/resource.go: parseTags to a common util library
func parseTags(tagsAnno string) []string {
After I made the chaand nge as mentioned above, deploy the image to my k8s cluster, the service tag can now be correctly spilited
@lkysow Hey, Luke Kysow, PR #719 seems to be authored by you, could you please take a look at this issue, and decide if the proposed solution is reasonable? Many thanks!
This is current the blocker for our team to onboard using Consul :)
The text was updated successfully, but these errors were encountered:
Hi @erdanzhang - Thanks for raising this issue to our attention, I've merged the fix into our main branch and it should be part of our upcoming release.
Cheers.
~Kyle
Community Note
Per document:
https://www.consul.io/docs/k8s/annotations-and-labels
Commas in service tags should be able to be escaped by "". However, when using the K8S deploy template and enabling service mesh (sidecar injection)
The service tag got through Consul API endpoint:
Reproduction Steps
Installing Consul helm chart, enable connect inject. And deploy a service by adding the annotation above. By using the Consul catalog API endpoint, we should able to see the reproduced result.
More Context
A similar issue has been address in here:
#719
And a merged PR:
#983
However, the merged code ONLY parses the services tag when running the command sync-catalog
not in the controller
inject-connect`.A possible reasonable solution is to add the following line in
control-plane/connect-inject/endpoints_controller.go:1215
toconsulTags
function:After I made the chaand nge as mentioned above, deploy the image to my k8s cluster, the service tag can now be correctly spilited
@lkysow Hey, Luke Kysow, PR #719 seems to be authored by you, could you please take a look at this issue, and decide if the proposed solution is reasonable? Many thanks!
This is current the blocker for our team to onboard using Consul :)
The text was updated successfully, but these errors were encountered: