Introduce Kusto management commands #597
Merged
+675
−70
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.
Create a new CRD, ManagementCommands, that enable maintaining Kusto clusters via execution of arbitrary managemet commands.
This pull request introduces significant changes to the
api/v1
,ingestor/adx
, andingestor/storage
directories to support the management of commands in the system. The key changes include the addition of new types and methods for handling management commands, updates to deepcopy functions, and modifications to tests to accommodate these new functionalities.New Features:
ManagementCommand
andManagementCommandList
types, along with their specifications and statuses inapi/v1/managementcommand_types.go
.ManagementCommandTask
and its related methods to handle the execution and status updates of management commands iningestor/adx/tasks.go
.Codebase Enhancements:
DeepCopyInto
andDeepCopy
methods forAlertRule
,AlertRuleSpec
,AlertRuleStatus
,Function
,FunctionList
,ManagementCommand
, andManagementCommandList
inapi/v1/zz_generated.deepcopy.go
. [1] [2] [3] [4] [5] [6]Testing:
ingestor/adx/tasks_test.go
andingestor/storage/kql_functions_test.go
. These changes include setting up the test environment, creating management command resources, and verifying their execution and status updates. [1] [2] [3] [4] [5] [6] [7] [8]Bug Fixes:
fmt.Errorf
witherrors.New
iningestor/storage/kql_functions.go
.Miscellaneous:
These changes collectively enhance the functionality and maintainability of the codebase, particularly in managing and executing commands within the system.