Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Missing Zone label #14

Open
rghetia opened this issue Jun 21, 2019 · 0 comments
Open

Missing Zone label #14

rghetia opened this issue Jun 21, 2019 · 0 comments

Comments

@rghetia
Copy link
Contributor

rghetia commented Jun 21, 2019

Kube operator injects following resources labels with resource Type as k8s.

Label Description Example
k8s.cluster.name The name of the cluster that the pod is running in. opencensus-cluster
k8s.namespace.name The name of the namespace that the pod is running in. default
k8s.pod.name The name of the pod. opencensus-pod-autoconf
k8s.deployment.name The name of the deployment. opencensus

This gets translated to 'k8s_container` resource in Stackdriver exporter as per this mapping

The problem here is that there is no Zone label injected by kube operator. As a result there is no location label after conversion in SD Exporter. 'location' being a mandatory label for 'k8s_container' resource type, the timeseries gets rejected due to missing location label.

This could be designated as SD Exporter issue but kube operator becomes useless for SD Exporter without location. Anyone who wants to use these resource labels would have to add gke.Detect() in SD exporter option . Hence the issue is opened here to add Zone label support.

rghetia pushed a commit to census-ecosystem/opencensus-go-exporter-stackdriver that referenced this issue Dec 3, 2019
* Use standard label name for location.

The location label is required. The resource type mappings defined in resource.go uniformly expect resourcekeys.CloudKeyZone, except the `generic_task`, but there is no good reason for that, as Stackdriver still requires a valid cloud location for `generic_task`. Therefore, use a cloud location everywhere.

This makes the exporter work out-of-the-box in conjuction with `kubernetes-operator` and partially addresses census-ecosystem/kubernetes-operator#14

* Update stackdriver.go

Added printfs that are useful for diagnosing resource discovery.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant