-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[AKS] az aks create/update: Add --enable-container-network-logs parameter
#32700
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
base: dev
Are you sure you want to change the base?
[AKS] az aks create/update: Add --enable-container-network-logs parameter
#32700
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @carlotaarvela, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks create | cmd aks create added parameter enable_container_network_logs |
||
| aks update | cmd aks update added parameter disable_container_network_logs |
||
| aks update | cmd aks update added parameter enable_container_network_logs |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for enabling and disabling Container Network Logs on AKS clusters with Advanced Container Networking Services (ACNS). The feature requires ACNS, monitoring addon, and Cilium network dataplane.
Changes:
- Added
--enable-container-network-logsparameter foraz aks createandaz aks update - Added
--disable-container-network-logsparameter foraz aks update - Automatically enables High Log Scale Mode when container network logs are enabled
- Added validation to ensure prerequisites (ACNS and monitoring addon) are met
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| _params.py | Added parameter definitions for enable/disable container network logs flags |
| _help.py | Added help text for the new parameters and updated high log scale mode description |
| custom.py | Added parameters to aks_create, aks_update, and aks_enable_addons functions; changed enable_syslog and enable_high_log_scale_mode defaults from False to None |
| managed_cluster_decorator.py | Implemented get_container_network_logs() method with validation, modified get_enable_high_log_scale_mode() to auto-enable when CNL is enabled, added update_monitoring_profile_flow_logs() method |
| addonconfiguration.py | Added Microsoft-ContainerNetworkLogs to ContainerInsightsStreams list |
| test_managed_cluster_decorator.py | Added comprehensive unit tests for various container network logs scenarios |
| test_aks_commands.py | Added integration test for creating cluster with container network logs enabled |
| linter_exclusions.yml | Added exclusions for the long parameter names |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_managed_cluster_decorator.py
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Queued live test to validate the change, test passed!
- test_aks_create_acns_with_flow_logs (failed due to preview feature flag)
- test_aks_create_with_monitoring_aad_auth_msi_with_syslog
- test_aks_create_with_monitoring_aad_auth_uai_with_syslog
- test_aks_enable_monitoring_with_aad_auth_msi_with_syslog
- test_aks_enable_monitoring_with_aad_auth_uai_with_syslog
- test_aks_create_with_monitoring_aad_auth_msi_with_datacollectionsettings_and_otheraddon
- test_aks_create_with_monitoring_aad_auth_with_highlogscale
- test_aks_create_with_private_cluster_with_monitoring_aad_auth_msi_with_ampls_with_highlogscale
az aks create/update: Add --enable-container-network-logs parameteraz aks create/update: Add --enable-container-network-logs parameter
bf12a24 to
7254c48
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az aks create
az aks update
Description
Add support for enabling and disabling Container Network Logs on AKS clusters with Advanced Container Networking Services (ACNS).
New parameters:
az aks create --enable-container-network-logs: Enable container network logs during cluster creationaz aks update --enable-container-network-logs: Enable container network logs on an existing clusteraz aks update --disable-container-network-logs: Disable container network logs on an existing clusterContainer Network Logs requires ACNS enabled, monitoring addon enabled, and cilium network dataplane. When enabled, High Log Scale Mode is automatically enabled if not explicitly disabled.
Testing Guide
History Notes
[AKS]
az aks create: Add--enable-container-network-logsparameter to enable container network logs[AKS]
az aks update: Add--enable-container-network-logsand--disable-container-network-logsparametersThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.