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(terraform): Ensure that only critical system pods run on system nodes #5665

Merged
merged 9 commits into from
Nov 6, 2023
Merged

feat(terraform): Ensure that only critical system pods run on system nodes #5665

merged 9 commits into from
Nov 6, 2023

Conversation

tdefise
Copy link
Contributor

@tdefise tdefise commented Oct 18, 2023

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Fixes #5664

Description

Microsoft recommends isolating critical system pods from application pods to prevent misconfigured or rogue application pods from accidentally killing system pods.

This can be enforced by creating a dedicated system node pool with the CriticalAddonsOnly=true:NoSchedule taint to prevent application pods from being scheduled on system node pools.

This is explained here https://learn.microsoft.com/en-us/azure/aks/use-system-pools?tabs=azure-cli#system-and-user-node-pools

(Through Terraform, this is done with "only_critical_addons_enabled")

Fix

Set the "only_critical_addons_enabled" variable to true within the default_node_pool

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

nice, thanks 🍺

@gruebel gruebel merged commit 08d963b into bridgecrewio:main Nov 6, 2023
37 checks passed
pull bot pushed a commit to Julian-Louis/checkov that referenced this pull request Nov 6, 2023
…nodes (bridgecrewio#5665)

* Created check CKV_AZURE_228

* Created check CKV_AZURE_229

* Those are from another PR

* Should not be there

* Removed unused import

* Fixed flake8 findings

* fixed bug in the test

* adjust check ID

---------

Co-authored-by: Thomas Defise <[email protected]>
Co-authored-by: Anton Grübel <[email protected]>
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.

Azure Kubernetes Services - Ensure that only critical system pods run on system nodes.
3 participants