Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Cloudprober returning target without correct host for external probe #451

Closed
jwillker opened this issue Aug 31, 2020 · 3 comments · Fixed by #454
Closed

Cloudprober returning target without correct host for external probe #451

jwillker opened this issue Aug 31, 2020 · 3 comments · Fixed by #454
Assignees
Milestone

Comments

@jwillker
Copy link

I have config an external probe to can perform probes in gRPC service.

probe {
      type: EXTERNAL
      name: "grpc-internal-probe"
      targets {
        rds_targets {
          resource_path: "k8s://services"
          filter {
            key: "labels.probetype"
            value: "grpc"
          }
          filter {
            key: "labels.fqdn"
            value: ".*.svc.cluster.local"
          }
        }
      }
      external_probe {
        command: "/bin/grpc_health_probe -addr=@target@:50051"
      }
      interval_msec: 10000
      timeout_msec: 5000
    }

rds_server {
      provider {
        kubernetes_config {
          services {}
        }
      }
    }

I have a Cloudprober custom docker image with the this tool
So i can perform this: command: "/bin/grpc_health_probe -addr=@target@:50051"

But in my clusters, all services serve behind the istio-proxy.
So we have the same problem related here: #438

The @target@ come only with the name of the service like my-app, but to work in Istio we need the FQDN of the service like my-app.my-namespace.svc.cluster.local.

See the error:

I0828 14:48:16.646542       1 external.go:510] Running external command: /bin/grpc_health_probe -addr=my-app:50051
E0828 14:48:17.653696       1 external.go:519] external probe process died with the status: exit status 2. Stderr: timeout: failed to connect service "my-app:50051" within 1s

There some way to deal with this?

@manugarg
Copy link
Contributor

manugarg commented Sep 1, 2020

I guess we can provide a way to access target labels on the command line the same way as @target@, for example @target.label.fqdn@. I'll take a stab at it

@manugarg manugarg self-assigned this Sep 1, 2020
@manugarg manugarg added this to the v0.10.10 milestone Sep 1, 2020
manugarg added a commit that referenced this issue Sep 2, 2020
manugarg added a commit that referenced this issue Sep 2, 2020
@manugarg
Copy link
Contributor

manugarg commented Sep 2, 2020

#454 adds the way to access target's fqdn using "@target.label.fqdn@" in command arguments. Can you please give that a try and let me know if it's not working.

@jwillker
Copy link
Author

jwillker commented Sep 8, 2020

#454 adds the way to access target's fqdn using "@target.label.fqdn@" in command arguments. Can you please give that a try and let me know if it's not working.

This work perfectly, thank you again for the fast resolution 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants