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

OCPBUGS-19744: Add RawSelinuxProfile type to the known type #1889

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

Vincent056
Copy link
Contributor

@Vincent056 Vincent056 commented Sep 21, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

This fixes a issue when we create a raw SELinux profile, we were not able to recognize the owner of the nodestatus if a rawselinuxprofile is being created

Which issue(s) this PR fixes:

Fixes OCPBUGS-19744

Does this PR have test?

N/A

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

Fixes a issue when we create a raw SELinux profile, we were not able to recognize the owner of the `NodeStatus` if a `RawSelinuxProfile` is being created.

This fixs a issue when we create a raw Selinux profile, we were not able to recognize the owner of the nodestatus if a rawselinuxprofile is being created
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 21, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #1889 (391e99f) into main (f8fab34) will decrease coverage by 0.01%.
Report is 53 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1889      +/-   ##
==========================================
- Coverage   49.23%   49.22%   -0.01%     
==========================================
  Files          71       72       +1     
  Lines        7024     7033       +9     
==========================================
+ Hits         3458     3462       +4     
- Misses       3432     3437       +5     
  Partials      134      134              

@saschagrunert
Copy link
Member

/retest

@Vincent056 Vincent056 changed the title WIP: Add RawSelinuxProfile type to the known type Add RawSelinuxProfile type to the known type Sep 26, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2023
@Vincent056 Vincent056 changed the title Add RawSelinuxProfile type to the known type OCPBUGS-19744: Add RawSelinuxProfile type to the known type Sep 26, 2023
@Vincent056
Copy link
Contributor Author

Vincent056 commented Sep 26, 2023

Manually tested, this fixes the issue:

Deploy raw selinux profile:

apiVersion: security-profiles-operator.x-k8s.io/v1alpha2
kind: RawSelinuxProfile
metadata:
  name: nginx-secure-raw
  namespace: nginx-deploy
spec:
  policy: |
    (block nginx-secure_nginx-deploy
    (blockinherit container)
    (allow process nginx-secure_nginx-deploy.process ( tcp_socket ( listen )))
    (allow process http_cache_port_t ( tcp_socket ( name_bind )))
    (allow process node_t ( tcp_socket ( node_bind ))))

Watch rawselinuxprofile status to become ready.

[vincent@node spo-demo]$ oc get rawselinuxprofile
NAME               USAGE                                   STATE
nginx-secure-raw   nginx-secure-raw_nginx-deploy.process   Installed

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS 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 Sep 26, 2023
@k8s-ci-robot k8s-ci-robot merged commit 02bf98a into kubernetes-sigs:main Sep 26, 2023
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. kind/bug Categorizes issue or PR as related to a bug. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants