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

MULTIARCH-4654: Enabled the Security Profiles Operator for ppc64le #2589

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pranitaT
Copy link

@pranitaT pranitaT commented Dec 2, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR enables the Security Profiles Operator for the ppc64le architecture, providing support for managing seccomp and SELinux profiles. The changes have been tested and verified using logenricher to ensure functionality and compliance.

Which issue(s) this PR fixes: https://issues.redhat.com/browse/MULTIARCH-4654

Does this PR have test?

N/A

Special notes for your reviewer:

  • Tested for compatibility with seccomp and SELinux profiles on the ppc64le architecture.
  • Verified functionality using logenricher.

Does this PR introduce a user-facing change?

Enabled the Security Profiles Operator for `ppc64le` architecture with support for seccomp and SELinux profile management.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. 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 Dec 2, 2024
Copy link

linux-foundation-easycla bot commented Dec 2, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: pranitaT / name: Pranita Turrey (e3c0400)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 2, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @pranitaT!

It looks like this is your first PR to kubernetes-sigs/security-profiles-operator 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/security-profiles-operator has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 2, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @pranitaT. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pranitaT
Once this PR has been reviewed and has the lgtm label, please assign jaormx for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 2, 2024
@saschagrunert
Copy link
Member

Thank you for the PR @pranitaT, do you mind signing the CLA?

@prb112
Copy link

prb112 commented Dec 2, 2024

Hey @saschagrunert I shared with Pranita how our team signs the CLA. We'll get this done a.s.a.p. Thank you for the time, Paul

Comment on lines 14 to 15
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.ppc64le: supported
Copy link

Choose a reason for hiding this comment

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

Suggested change
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.ppc64le: supported

We don't need the arches. I think arm/amd64 are already supported and we are adding s390x.

@@ -102,7 +102,7 @@ func generateBpfObj(builder *strings.Builder) error {
builder.WriteString(header)
builder.WriteString("var bpfObjects = map[string][]byte{\n")

for _, arch := range []string{"amd64", "arm64"} {
for _, arch := range []string{"amd64", "arm64", "ppc64le", "s390x"} {
Copy link

Choose a reason for hiding this comment

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

Suggested change
for _, arch := range []string{"amd64", "arm64", "ppc64le", "s390x"} {
for _, arch := range []string{"amd64", "arm64"} {

Copy link

Choose a reason for hiding this comment

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

sorry based on testing, I don't think we need this anymore.

@@ -65,7 +65,7 @@ const (
docsHeader = "The following Kernels are supported to run the BPF recorder " +
"beside those which already expose `/sys/kernel/btf/vmlinux`. " +
"Please note that at least a Linux kernel version 5.8 is required " +
"to use the bpf recorder.\n\n"
"to use the bpf recorder, and this includes support for ppc64le and s390x architectures.\n\n"
Copy link

Choose a reason for hiding this comment

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

Suggested change
"to use the bpf recorder, and this includes support for ppc64le and s390x architectures.\n\n"
"to use the bpf recorder.\n\n"

@saschagrunert
Copy link
Member

Please rebase to fix the CI

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 4, 2024
@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch 3 times, most recently from 57bc010 to afbcb5b Compare December 4, 2024 06:40
@saschagrunert
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 4, 2024
@@ -0,0 +1,16 @@
//go:build !ppc64le && !s390x
// +build !ppc64le,!s390x
Copy link

Choose a reason for hiding this comment

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

Suggested change
// +build !ppc64le,!s390x
// +build !ppc64le,!s390x,!amd64

Or remove the amd64 entry, and push the method details in here.

Copy link

Choose a reason for hiding this comment

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

Probably need to change to _default.go or something along those lines

@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch 4 times, most recently from 457c49d to f889b64 Compare December 5, 2024 11:57
@k8s-ci-robot k8s-ci-robot added 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 Dec 5, 2024
@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch 2 times, most recently from b90ed22 to f5fe13d Compare December 5, 2024 13:41
@@ -91,6 +91,7 @@ data:
"setuid",
"sigaltstack",
"socket",
"stat", # Adding 'stat' to support mkdirall functionality
Copy link

Choose a reason for hiding this comment

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

Suggested change
"stat", # Adding 'stat' to support mkdirall functionality
"stat",

Adding 'stat' to support mkdirall functionality

Comment on lines +24 to +32
// UnameMachineToString provides a stub implementation for unsupported architectures.
func UnameMachineToString(uname syscall.Utsname) string {
return ""
}

// UnameReleaseToString provides a stub implementation for unsupported architectures.
func UnameReleaseToString(uname syscall.Utsname) string {
return ""
}
Copy link

Choose a reason for hiding this comment

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

Suggested change
// UnameMachineToString provides a stub implementation for unsupported architectures.
func UnameMachineToString(uname syscall.Utsname) string {
return ""
}
// UnameReleaseToString provides a stub implementation for unsupported architectures.
func UnameReleaseToString(uname syscall.Utsname) string {
return ""
}
// UnameMachineToString converts uname.Machine to a string for arm64.
func UnameMachineToString(uname *syscall.Utsname) string {
return toStringInt8(uname.Machine)
}
// UnameReleaseToString converts uname.Release to a string for arm64.
func UnameReleaseToString(uname *syscall.Utsname) string {
return toStringInt8(uname.Release)
}

@@ -0,0 +1,32 @@
//go:build !ppc64le && !s390x && !amd64 && !arm64 && !linux
Copy link

Choose a reason for hiding this comment

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

Suggested change
//go:build !ppc64le && !s390x && !amd64 && !arm64 && !linux
//go:build !ppc64le && !s390x

@@ -0,0 +1,44 @@
//go:build ppc64le && linux
Copy link

Choose a reason for hiding this comment

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

Suggested change
//go:build ppc64le && linux
//go:build (ppc64le || s390x) && linux

What about something like the above?

@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch 4 times, most recently from 4590beb to 72e99ac Compare December 6, 2024 13:07
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 6, 2024
@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch from 72e99ac to a75a1ac Compare December 6, 2024 13:18
dirPermissionMode os.FileMode = 0o744
// dirPermissionMode os.FileMode = 0o744.

dirPermissionMode os.FileMode = 0o755
Copy link

Choose a reason for hiding this comment

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

maybe causing the failures... original is 744

@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch 4 times, most recently from 1a91fed to e520108 Compare December 9, 2024 13:04
@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch 7 times, most recently from 81d52e8 to ce9904c Compare December 20, 2024 07:27
…dded fixes for seccomp and SELinux profiles, and verified functionality with logenricher.
@pranitaT pranitaT force-pushed the nov24-ppc64le-support branch from ce9904c to e3c0400 Compare December 20, 2024 07:41
@k8s-ci-robot
Copy link
Contributor

@pranitaT: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-security-profiles-operator-test-e2e e3c0400 link true /test pull-security-profiles-operator-test-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants