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

fix(core): annotation logic for static pods #1641

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

Shreyas220
Copy link
Member

Purpose of PR?:

Fixes #1635

Does this PR introduce a breaking change?
No

If the changes in this PR are manually verified, list down the scenarios covered::

1: pod deployed before KubeArmor
2: pod deployed after KubeArmor

Additional information for reviewer? :

kubearmor cannot annotate static pod with apparmor annotations

2024-02-19 05:40:04.024021	ERROR	Failed to update AppArmor Annotations (default/nginx-pod/nginx-pod, Pod "nginx-pod" is invalid: metadata.annotations[container.apparmor.security.beta.kubernetes.io/nginx-pod]: Forbidden: may not add AppArmor annotations)

i still have the logic for annotating static pod in k8shandler , will/not remove based on review

Checklist:

  • Bug fix. Fixes #
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

Copy link
Member

@daemon1024 daemon1024 left a comment

Choose a reason for hiding this comment

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

LGTM 👌🏽

Please handle fmt/lint errors, and squash commits, rebase to latest.

@Shreyas220 Shreyas220 force-pushed the fix-pod-owner-error branch 2 times, most recently from 8f76f33 to 58ef085 Compare February 19, 2024 16:46
Copy link
Member

@DelusionalOptimist DelusionalOptimist left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @Shreyas220!

Signed-off-by: Shreyas220 <shreyas.ny@gmail.com>

removing static pod annotation logic and adding one for deployment

Signed-off-by: Shreyas220 <shreyas.ny@gmail.com>

sdfsf

Signed-off-by: Shreyas220 <shreyas.ny@gmail.com>
@DelusionalOptimist DelusionalOptimist merged commit 4376733 into kubearmor:main Feb 20, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

bug: AppArmor annotation logic for orphan/static pods fails
3 participants