Backend: Create client to connect with Kyverno Policy Reporter
Description:
Develop a Golang client to interact with the Kyverno Policy Reporter for retrieving policy violations a log events for violations.
Tasks:
-
Configuration
- Add Kyverno Policy Reporter settings (base URL, credentials) to config.
-
Client Implementation
- Authenticate with the Policy Reporter API.
- Fetch policy violation data and normalize it.
-
Error Handling
- Add retry mechanisms for transient API failures.
-
Testing
- Write unit tests for API interactions and error scenarios.
- Perform integration tests with the Policy Reporter API.
Acceptance Criteria:
- Golang client retrieves and processes policy violation data.
- Robust error handling and retries are implemented.
- Unit and integration tests validate functionality.
References:
Edited by Manuel Ucles