Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Kusto management commands #597

Merged
merged 2 commits into from
Feb 28, 2025
Merged

Conversation

jessejlt
Copy link
Member

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, and ingestor/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:

  • Management Commands API:
    • Added ManagementCommand and ManagementCommandList types, along with their specifications and statuses in api/v1/managementcommand_types.go.
    • Introduced ManagementCommandTask and its related methods to handle the execution and status updates of management commands in ingestor/adx/tasks.go.

Codebase Enhancements:

  • Deepcopy Functions:
    • Updated DeepCopyInto and DeepCopy methods for AlertRule, AlertRuleSpec, AlertRuleStatus, Function, FunctionList, ManagementCommand, and ManagementCommandList in api/v1/zz_generated.deepcopy.go. [1] [2] [3] [4] [5] [6]

Testing:

  • Test Adjustments:
    • Modified existing tests and added new tests for the management commands in ingestor/adx/tasks_test.go and ingestor/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:

  • Error Handling:
    • Improved error handling by replacing fmt.Errorf with errors.New in ingestor/storage/kql_functions.go.

Miscellaneous:

  • Code Cleanup:
    • Removed unused imports and redundant code in various files to streamline the codebase. [1] [2] [3] [4] [5] [6]

These changes collectively enhance the functionality and maintainability of the codebase, particularly in managing and executing commands within the system.

Create a new CRD, ManagementCommands, that enable maintaining Kusto clusters via execution of arbitrary managemet commands.
@jessejlt jessejlt force-pushed the jesse/management-commands-impl branch from 6b58462 to 748ad21 Compare February 28, 2025 16:36
@jessejlt jessejlt enabled auto-merge (squash) February 28, 2025 16:36
@jessejlt jessejlt requested a review from jwilder February 28, 2025 16:36
@jessejlt jessejlt merged commit f01954a into main Feb 28, 2025
5 checks passed
@jessejlt jessejlt deleted the jesse/management-commands-impl branch February 28, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants