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 : Pods not being annotated with kubearmor-policy=enabled by Kubearmor controller #1610

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

Aryan-sharma11
Copy link
Member

@Aryan-sharma11 Aryan-sharma11 commented Feb 6, 2024

Purpose of PR?:

Fixes #CI failure for BPFLSM

Context -
We updated the dependencies for controller runtime to v0.15.3 in.
Apparently, after v0.15the injection pkg is removed, causing the decoder to be created with a nil value in our kubearmor controller code.

The change in this PR is made in accordance with the updated logs of kubernetes-sigs controller-runtime.

How we verified the error

  • whenever a new deployment was created we tried to update the annotation of the pod through the (a *PodAnnotator) Handle() function this caused panic in the controller logs.

Does this PR introduce a breaking change?

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

  • Build KubarmorController locally , and try to deploy a new pod. Watch controller logs kubectl logs -n kubearmor<> -f.
    There should be no panic error in logs.
    Additional information for reviewer? :
    Mention if this PR is part of any design or a continuation of previous PRs

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

@Aryan-sharma11 Aryan-sharma11 force-pushed the ci-test branch 3 times, most recently from 37abc0e to 5d89eb4 Compare February 7, 2024 11:10
@Aryan-sharma11 Aryan-sharma11 changed the title Fix : CI failure Fix : Pods not being annotated with kubearmor-policy=enabled by Kubearmor controller Feb 7, 2024
@daemon1024 daemon1024 merged commit d47948a into kubearmor:main Feb 7, 2024
12 checks passed
@Aryan-sharma11 Aryan-sharma11 deleted the ci-test branch February 15, 2024 10:06
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