otterize / network-mapper

Map Kubernetes traffic: in-cluster, to the Internet, and to AWS IAM and export as text, intents, or an image
Apache License 2.0
612 stars 23 forks source link

Query result podOwnerKind is null #78

Closed undera closed 1 year ago

undera commented 1 year ago

I have a network-mapper instance v0.1.12 and I'm trying to build a correct GraphQL query for its API. I'm trying to make query to return intents with corresponding kind field. I have composed the following request:

query ServiceIntentsUpToMapperV017 ($namespaces: [String!]) {
    serviceIntents(namespaces: $namespaces) {
        client {
            ... NamespacedNameFragment
        }
        intents {
            ... NamespacedNameFragment
        }
    }
}
fragment NamespacedNameFragment on OtterizeServiceIdentity {
    name
    namespace
    podOwnerKind { 
      kind
    }
}

But whenever I execute it against mapper, the "podOwnerKind" field is always null. I expect to get the valid podOwnerKind for all the cases, be it just orphaned pod, deployment, job etc.

Evyatar Meged has suggested on Slack that it's a real bug.

Corresponding Slack thread: https://otterizecommunity.slack.com/archives/C046SG6PRJM/p1677597181342809

amit7itz commented 1 year ago

Hi @undera, thanks for reporting the issue. We just released v0.1.13 which includes a fix

undera commented 1 year ago

Wow, that was fast! Thanks, I already tried and it works as expected.