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

Update kubectl command in security-profiles-operator documentation #2321

Closed
Aaina26 opened this issue Jun 20, 2024 · 1 comment · Fixed by #2322
Closed

Update kubectl command in security-profiles-operator documentation #2321

Aaina26 opened this issue Jun 20, 2024 · 1 comment · Fixed by #2322
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Aaina26
Copy link

Aaina26 commented Jun 20, 2024

What happened:

While investigating the following issue: kubernetes/kubernetes#125526 I found an issue with a command under https://github.com/kubernetes-sigs/security-profiles-operator/blob/main/installation-usage.md#create-an-apparmor-profile
This command: kubectl -n security-profiles-operator patch spod spod --type=merge -p '{"spec":{"enableAppArmor":"true"}}' should produce this output securityprofilesoperatordaemon.security-profiles-operator.x-k8s.io/spod patched. But it produces this output instead The SecurityProfilesOperatorDaemon "spod" is invalid: spec.enableAppArmor: Invalid value: "string": spec.enableAppArmor in body must be of type boolean: "string"

Solution:

replace the command with this command instead: kubectl -n security-profiles-operator patch spod spod --type=merge -p '{"spec":{"enableAppArmor":true}}'
Running this resolves the issue and gives the expected output.

@Aaina26 Aaina26 added the kind/bug Categorizes issue or PR as related to a bug. label Jun 20, 2024
saschagrunert added a commit to saschagrunert/security-profiles-operator that referenced this issue Jun 20, 2024
The docs interpret the bool as string which leads into a wrong command.
Now it's fixed by omitting the `"`.

Fixes kubernetes-sigs#2321

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member

saschagrunert commented Jun 20, 2024

Thank you for the report @Aaina26, a fix is landing in #2322.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants