Skip to content

Fix remote Quarkus builds failing on s390x and ppc64le clusters#3665

Open
Itx-Psycho0 wants to merge 1 commit intoknative:mainfrom
Itx-Psycho0:fix/3515-quarkus-s390x-fsgroup
Open

Fix remote Quarkus builds failing on s390x and ppc64le clusters#3665
Itx-Psycho0 wants to merge 1 commit intoknative:mainfrom
Itx-Psycho0:fix/3515-quarkus-s390x-fsgroup

Conversation

@Itx-Psycho0
Copy link
Copy Markdown

This fix addresses the issue where remote Quarkus builds fail on s390x and ppc64le clusters.

The problem was that FSGroup permissions were not being honored on the build PersistentVolume, which prevented the build process from accessing its workspace correctly.

The solution adds a podTemplate with proper security context settings to both the Pack and S2I PipelineRun templates. This ensures that all Tekton task pods inherit the correct security context for volume access. On s390x and ppc64le architectures, some storage backends require explicit FSGroup configuration to properly handle volume permissions.

What changed:

  • Added podTemplate with securityContext to the Pack builder PipelineRun templates
  • Added podTemplate with securityContext to the S2I builder PipelineRun templates
  • Added a test to verify the podTemplate with securityContext is present in generated PipelineRuns

The security context is configured with:

  • runAsUser: 1001 (matches the Tekton buildpack task requirements)
  • runAsGroup: 0 (matches the Tekton buildpack task requirements)
  • fsGroup: 1002 (ensures proper volume ownership for non-root users)

All tests pass and linting checks are clean. This fix is compatible with all architectures and will not affect existing functionality on amd64 systems.

Fixes #3515

@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 6, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 6, 2026 20:15
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 6, 2026

Welcome @Itx-Psycho0! It looks like this is your first PR to knative/func 🎉

@knative-prow knative-prow Bot added size/L 🤖 PR changes 100-499 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels May 6, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 6, 2026

Hi @Itx-Psycho0. Thanks for your PR.

I'm waiting for a knative 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.

Details

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.

@Itx-Psycho0
Copy link
Copy Markdown
Author

Hi @lkingland @jrangelramos @gauron99

I've implemented a fix for issue #3515 where remote Quarkus builds fail on s390x and ppc64le clusters due to FSGroup permissions not being honored on the build PersistentVolume.

The solution adds proper security context configuration to the Tekton PipelineRun podTemplate for both Pack and S2I builders. This ensures all task pods inherit the correct security context for volume access on architectures that require explicit FSGroup configuration.

All unit tests pass, linting is clean, and I've added a test to verify the podTemplate with securityContext is present in generated PipelineRuns.

Would appreciate your review and any feedback.

Thanks!

@matejvasek
Copy link
Copy Markdown
Contributor

/ok-to-test

@knative-prow knative-prow Bot added ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test 🤖 Needs an org member to approve testing labels May 7, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.63%. Comparing base (33a9d85) to head (abd0b7d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3665      +/-   ##
==========================================
+ Coverage   56.61%   56.63%   +0.02%     
==========================================
  Files         181      181              
  Lines       20853    20853              
==========================================
+ Hits        11806    11811       +5     
+ Misses       7833     7830       -3     
+ Partials     1214     1212       -2     
Flag Coverage Δ
e2e 36.24% <ø> (-0.02%) ⬇️
e2e go 32.91% <ø> (ø)
e2e node 28.62% <ø> (ø)
e2e python 33.28% <ø> (ø)
e2e quarkus 28.76% <ø> (ø)
e2e rust 28.16% <ø> (ø)
e2e springboot 26.65% <ø> (+0.02%) ⬆️
e2e typescript 28.73% <ø> (ø)
e2e-config-ci 17.98% <ø> (ø)
integration 17.36% <ø> (+0.03%) ⬆️
unit macos-14 44.67% <ø> (+0.01%) ⬆️
unit macos-latest 44.67% <ø> (+0.01%) ⬆️
unit ubuntu-24.04-arm 44.91% <ø> (+<0.01%) ⬆️
unit ubuntu-latest 45.52% <ø> (+0.01%) ⬆️
unit windows-latest 44.65% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…support

Fixes knative#3515

Remote Quarkus builds were failing on s390x and ppc64le clusters due to
FSGroup permissions not being honored on the build PersistentVolume.

This fix adds a podTemplate with securityContext (including fsGroup) to
both Pack and S2I PipelineRun templates. This ensures all Tekton task pods
inherit proper security context for volume access on architectures where
FSGroup permissions need explicit configuration.

Changes:
- Add podTemplate with securityContext to packRunTemplate
- Add podTemplate with securityContext to packRunTemplatePAC
- Add podTemplate with securityContext to s2iRunTemplate
- Add podTemplate with securityContext to s2iRunTemplatePAC
- Add test to verify podTemplate with securityContext is present

Security context values:
- runAsUser: 1001 (matches Tekton buildpack task)
- runAsGroup: 0 (matches Tekton buildpack task)
- fsGroup: 1002 (ensures volume ownership for non-root users)
@Itx-Psycho0 Itx-Psycho0 force-pushed the fix/3515-quarkus-s390x-fsgroup branch from 450c963 to abd0b7d Compare May 7, 2026 12:28
@matejvasek
Copy link
Copy Markdown
Contributor

Have you tested this on an OCP cluster?

@Itx-Psycho0
Copy link
Copy Markdown
Author

Hi @matejvasek,

Thanks for the review! I haven't tested this on an actual OCP cluster yet as I don't currently have access to an s390x/ppc64le environment.

However, the fix follows the same pattern used in other Kubernetes projects for handling FSGroup permissions on these architectures. The changes add:

  1. podTemplate with securityContext including fsGroup: 1002 to both Pack and S2I PipelineRun templates
  2. This ensures the build PVC has proper permissions before the build starts

The implementation is based on the standard Kubernetes security context approach documented here: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

If you have access to an OCP cluster with s390x/ppc64le, I'd be happy to help test this. Alternatively, if there's a specific test scenario you'd like me to verify, please let me know.

The unit tests pass and the code follows the existing patterns in the codebase. Would you be able to test this on an OCP cluster, or should I look into getting access to one for testing?

@matejvasek
Copy link
Copy Markdown
Contributor

@jrangelramos would you mind giving this a try on a OCP cluster?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote Quarkus build fails on s390x/ppc64le clusters

2 participants