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

feat: Added filter to applicable VMSS ARG queries to filter out AKS managed VMSSs #564

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

judyer28
Copy link
Contributor

@judyer28 judyer28 commented Dec 10, 2024

Overview/Summary

A majority of the VMSS ARG queries do not apply to VMSS that are managed by AKS. This PR adds a filter to applicable ARG queries to filter out AKS managed VMSSs. The filter looks for a tag "aks-managed-poolName" on the VMSS. If it is there then it is considered a managed AKS VMSS. The line below is the filter used to ensure AKS VMSS are not considered as part of the VMSS recommendations.

| where isempty(tostring(tags['aks-managed-poolName']))

Related Issues/Work Items

Fixes AB#38580

Breaking Changes

  1. Replace me
  2. Replace me

As part of this pull request I have

  • Read the Contribution Guide and ensured this PR is compliant with the guide
  • Checked for duplicate Pull Requests
  • Associated it with relevant GitHub Issues or ADO Work Items (Internal Only)
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Ensured PR tests are passing
  • Performed testing and provided evidence (e.g. screenshot of output) for any changes associated to ARG queries
  • Updated relevant and associated documentation (e.g. Contribution Guide, Docs etc.)

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 suggestion.

Files not reviewed (1)
  • azure-resources/Compute/virtualMachineScaleSets/kql/1422c567-782c-7148-ac7c-5fc14cf45adc.kql: Evaluated as low risk
Comments skipped due to low confidence (1)

azure-resources/Compute/virtualMachineScaleSets/kql/94794d2a-eff0-2345-9b67-6f9349d0a627.kql:9

  • The use of iff function is redundant. isempty already returns a boolean value. Simplify the code to | where isempty(tostring(tags['aks-managed-poolName'])).
| where iff(isempty(tostring(tags['aks-managed-poolName'])), true, false)

@judyer28 judyer28 changed the title Added filter to applicable VMSS ARG queries to filter out AKS managed VMSSs feat: Added filter to applicable VMSS ARG queries to filter out AKS managed VMSSs Dec 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Enhancement 🆕 New feature or request label Dec 10, 2024
@judyer28
Copy link
Contributor Author

image image image image

@judyer28
Copy link
Contributor Author

image

@oZakari
Copy link
Collaborator

oZakari commented Dec 12, 2024

Thanks @judyer28! LGTM

@judyer28 judyer28 requested a review from Copilot December 12, 2024 18:15

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 6 changed files in this pull request and generated no suggestions.

Files not reviewed (1)
  • azure-resources/Compute/virtualMachineScaleSets/kql/1422c567-782c-7148-ac7c-5fc14cf45adc.kql: Evaluated as low risk
@oZakari oZakari requested a review from ejhenry December 12, 2024 18:27
Copy link
Contributor

@hannah-leland hannah-leland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks Justin!

Copy link
Contributor

@ejhenry ejhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ejhenry ejhenry merged commit 82540d4 into Azure:main Dec 13, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 🆕 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants