Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2004] feat(frontend): source describe (#1977)
This pull request introduces several new types and functionalities to enhance the analysis and description of Kubernetes sources in the `frontend/graph` module. The key changes include the addition of new types in the GraphQL schema and the implementation of a resolver function to describe sources. ### New Types and Schema Enhancements: * **GraphQL Schema (`frontend/graph/schema.graphqls`):** - Added new types such as `EntityProperty`, `InstrumentationLabelsAnalyze`, `InstrumentationConfigAnalyze`, `ContainerRuntimeInfoAnalyze`, `RuntimeInfoAnalyze`, `InstrumentedApplicationAnalyze`, `ContainerWorkloadManifestAnalyze`, `InstrumentationDeviceAnalyze`, `InstrumentationInstanceAnalyze`, `PodContainerAnalyze`, `PodAnalyze`, and `SourceAnalyze`. - Updated existing schema definitions to include the new `describeSource` query and adjusted formatting for better readability. ([frontend/graph/schema.graphqlsL208-R212](diffhunk://#diff-bc07b91dedd1782d9ddbbb6374ad97c7604f9a267de5174645723d863c732f80L208-R212), Fdc622fbL474R541) ### New Structs and Types: * **Model Definitions (`frontend/graph/model/models_gen.go`):** - Added new structs such as `ContainerRuntimeInfoAnalyze`, `ContainerWorkloadManifestAnalyze`, `EntityProperty`, `InstrumentationConfigAnalyze`, `InstrumentationDeviceAnalyze`, `InstrumentationInstanceAnalyze`, `InstrumentationLabelsAnalyze`, `InstrumentedApplicationAnalyze`, `PodAnalyze`, `PodContainerAnalyze`, `RuntimeInfoAnalyze`, and `SourceAnalyze`. [[1]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R81-R93) [[2]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R148-R154) [[3]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R229-R251) [[4]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R293-R298) [[5]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R443-R455) [[6]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R525-R529) [[7]](diffhunk://#diff-642ccd7ed71fdfa394bd7f7fd99c9c33e20ff18c876a91cb989d379a44390469R544-R557) ### Resolver Implementation: * **Resolver Function (`frontend/graph/schema.resolvers.go`):** - Implemented the `DescribeSource` resolver function to handle the new `describeSource` query. ### Service Layer: * **Service Implementation (`frontend/services/describe.go`):** - Added a new service function `GetSourceDescription` to fetch and convert source descriptions from Kubernetes into GraphQL response format. These changes collectively enhance the system's ability to analyze and describe Kubernetes sources, providing detailed insights into various properties and configurations. --------- Co-authored-by: alonkeyval <[email protected]>
- Loading branch information