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

fix PV will be encrypted failing due to restictive securityContext #835

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

outscale-hmi
Copy link
Contributor

@outscale-hmi outscale-hmi commented Oct 23, 2024

Problem Summary:

After adding the securityContext to both the controller and node, the pod was no longer able to mount or access the LUKS-encrypted volumes. This issue was traced to restrictive security settings that prevented necessary operations such as mounting, decrypting, and interacting with the LUKS-encrypted block devices.

Cause:

The restrictive security context blocked certain operations required by the CSI driver or the pod itself to manage the encrypted volumes. In particular, settings like allowPrivilegeEscalation: false and seccompProfile: RuntimeDefault were blocking essential system calls or preventing the pod from escalating privileges when needed.

Changes Made:

To resolve the issue, the following changes were applied:

  • Set privileged: true to allow full access to host resources for managing encrypted volumes.
  • Enabled allowPrivilegeEscalation: true to ensure the pod can escalate privileges when necessary.
  • Disabled seccomp restrictions temporarily by setting seccompProfile: Unconfined to allow system calls needed by LUKS or the CSI driver.
  • Set readOnlyRootFilesystem: false to allow necessary write operations.

These changes allow the pod and node to successfully mount and interact with the LUKS-encrypted volumes by ensuring that no critical operations are blocked by the security context.

@outscale-hmi outscale-hmi marked this pull request as ready for review October 23, 2024 12:32
@outscale-hmi outscale-hmi merged commit 2421aeb into master Oct 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants