Feat: support getting control plane logs #73
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces functionality for managing and querying AKS control plane diagnostics and logs, along with enhancements to command validation for security. The changes include new handler functions, tools registration, and specialized validation for KQL queries.
AKS Control Plane Diagnostics and Logs Management:
HandleControlPlaneDiagnosticSettings
andHandleControlPlaneLogs
functions to manage diagnostic settings and query control plane logs with validation and safety constraints. (internal/components/monitor/diagnostics_handlers.go
, internal/components/monitor/diagnostics_handlers.goR1-R400)aks_control_plane_diagnostic_settings
) and querying control plane logs (aks_control_plane_logs
) with detailed parameter validation and descriptions. (internal/components/monitor/registry.go
, internal/components/monitor/registry.goR101-R155)internal/server/server.go
, [1] [2]Security Enhancements:
az monitor log-analytics query
commands to ensure KQL queries are properly quoted and other command parts are free of dangerous patterns. (internal/security/validator.go
, [1] [2]