Conversation
- Add ConfigMaps field to CyberArk Snapshot structure - Add configmaps to kubernetesNativeResources map in k8sdynamic - Enable efficient SharedIndexInformer for ConfigMap resources
- Register ark/configmaps extractor function in defaultExtractorFunctions - Add ark/configmaps to list of default dynamic data gatherers
- Add TestConvertDataReadings_ConfigMaps for ConfigMap conversion - Add TestConvertDataReadings_ServiceAccounts for service account conversion - Add TestConvertDataReadings_Roles for role conversion - Add TestConvertDataReadings_MultipleResources for multi-resource scenarios - Verify deleted resources are properly excluded from snapshots
- Add ark/configmaps data gatherer with conjur.org label selector - Update Helm chart test snapshots with new ConfigMap configuration
- Add ark/configmaps data gatherer configuration with label selector - Add empty ConfigMap data entry to example input.json
- Add conjur-connect-configmap.yaml with CyberArk connection configuration - Update E2E test script to create sample ConfigMap for discovery testing - ConfigMap includes conjur.org/name label matching default label selector
There was a problem hiding this comment.
Pull request overview
This PR adds ConfigMap discovery capabilities to the dynamic data gatherer, allowing the agent to collect and report ConfigMap resources from Kubernetes clusters to the CyberArk Discovery and Context API.
Changes:
- Added ConfigMap support to the k8s-dynamic data gatherer with native informer integration for improved memory efficiency
- Integrated ConfigMaps into the data conversion pipeline and snapshot structure
- Updated deployment configurations, examples, and E2E tests to include ConfigMap collection with label-based filtering
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pkg/datagatherer/k8sdynamic/dynamic.go |
Registered ConfigMap native informer in kubernetesNativeResources map |
internal/cyberark/dataupload/dataupload.go |
Added ConfigMaps field to Snapshot structure |
pkg/client/client_cyberark.go |
Added extractor function for ark/configmaps data gatherer |
pkg/client/client_cyberark_test.go |
Updated test data gatherer names list to include ark/configmaps |
pkg/client/client_cyberark_convertdatareadings_test.go |
Added comprehensive test coverage for ConfigMap conversion, including deletion handling |
examples/machinehub.yaml |
Added ConfigMap data gatherer configuration with label selector |
examples/machinehub/input.json |
Added empty ConfigMap data reading entry |
hack/ark/conjur-connect-configmap.yaml |
Created sample ConfigMap for E2E testing |
hack/ark/test-e2e.sh |
Updated E2E test to deploy sample ConfigMap |
deploy/charts/disco-agent/templates/configmap.yaml |
Added ConfigMap data gatherer to Helm chart template |
deploy/charts/disco-agent/tests/__snapshot__/configmap_test.yaml.snap |
Updated snapshot tests with ConfigMap configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you @achuchev LGTM! I ran the one-shot command locally and outputted to a file, the agent discovered the example configmap in my cluster. |
Discovery of ConfigMap gaining insights into configuration.
Added ConfigMap resource type to the dynamic data gatherer:
How to test locally
Run the agent one-shot using the example MachineHub config:
go run . agent --one-shot --machine-hub -v 6 --agent-config-file ./examples/machinehub.yaml