K8s cloudquery sync empty context issue with service account setup

k8s CloudQuery sync is getting an empty context in sync data when using a service account (rbac.authorization), which is created using Helm. This context contains the cluster name. How can I get this data during sync?

Below is the k8s source YAML I’m using:

kind: source
spec: 
  name: "k8s"
  path: "cloudquery/k8s"
  registry: "github"
  version: "v5.2.7"
  tables: ["*"]
  destinations: ["postgresql"]

Hi @star-opossum,

I’m not sure off the top of my head. It seems specific to the use of a service account with RBAC authentication.

I don’t know your setup; how many clusters are you syncing data for? Could you use the sync source name field to store the cluster name? Or maybe as a label on the pods?

In any case, could you open an issue, preferably with all the steps needed to reproduce it, so we can have a look? GitHub - CloudQuery Issues