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

Add command argument to the daemon which allows to disable profile recorder controller #1290

Conversation

ccojocar
Copy link
Contributor

@ccojocar ccojocar commented Nov 10, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds an command argument to the daemon which allows to disable the profile recorder controller when neither bpf-recorder or log-enricher are enabled.

Which issue(s) this PR fixes:

Does this PR have test?

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add a command argument to the daemon which allows to disable the profile recorder controller.

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 10, 2022
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 10, 2022
@ccojocar
Copy link
Contributor Author

/assign @saschagrunert

Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

Would you also agree with enabling or disabling the controller with an environment variable? I'm thinking this way because of OLM installs where it's very easy to pass an environment variable to the operator through a Subscription object.

@jhrozek
Copy link
Contributor

jhrozek commented Nov 10, 2022

Also two nits - I think this should be a /kind feature and the switch (and the reason for introducing it) should be mentioned in installation-usage.md. Maybe if you think that the other switches should be mentioned as well, we could have a cleanup ticked that would document them all in one go, but currently our docs are not bad and I'd like to keep everything documented nicely.

@ccojocar
Copy link
Contributor Author

Would you also agree with enabling or disabling the controller with an environment variable? I'm thinking this way because of OLM installs where it's very easy to pass an environment variable to the operator through a Subscription object.

I'll add an environment variable in addition. What do you think?

@ccojocar
Copy link
Contributor Author

Also two nits - I think this should be a /kind feature and the switch (and the reason for introducing it) should be mentioned in installation-usage.md. Maybe if you think that the other switches should be mentioned as well, we could have a cleanup ticked that would document them all in one go, but currently our docs are not bad and I'd like to keep everything documented nicely.

I'll do this and also try to add a test.

@ccojocar ccojocar force-pushed the daemon-option-disable-recording-controller branch from 50fbbf5 to b554a66 Compare November 11, 2022 13:48
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 11, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2022

Codecov Report

Merging #1290 (cfd7b51) into main (0c22b6f) will increase coverage by 0.06%.
The diff coverage is 45.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1290      +/-   ##
==========================================
+ Coverage   43.92%   43.99%   +0.06%     
==========================================
  Files          49       49              
  Lines        5514     5576      +62     
==========================================
+ Hits         2422     2453      +31     
- Misses       2972     3004      +32     
+ Partials      120      119       -1     

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

Tiny nits, apart from that it is a lgtm from me. Thanks for working on this @ccojocar 🙇.

internal/pkg/config/config.go Show resolved Hide resolved
installation-usage.md Show resolved Hide resolved
@ccojocar ccojocar force-pushed the daemon-option-disable-recording-controller branch from 239a972 to 0f58aff Compare November 14, 2022 09:49
@ccojocar
Copy link
Contributor Author

/test all

@ccojocar ccojocar force-pushed the daemon-option-disable-recording-controller branch from 3e5d10e to 4c61035 Compare November 14, 2022 10:50
@ccojocar ccojocar force-pushed the daemon-option-disable-recording-controller branch from 4c61035 to 3f98462 Compare November 14, 2022 13:17
@ccojocar
Copy link
Contributor Author

/retest

@ccojocar
Copy link
Contributor Author

/retest

@ccojocar
Copy link
Contributor Author

@jhrozek @pjbgf @saschagrunert all checks passed now, please could you have a look at this pull request? Thanks

@saschagrunert
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 15, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ccojocar, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2022
@k8s-ci-robot k8s-ci-robot merged commit 71a856f into kubernetes-sigs:main Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants