Skip to content

🐛 set the SElinux type #1939

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

Closed
wants to merge 1 commit into from

Conversation

jianzhangbjz
Copy link

@jianzhangbjz jianzhangbjz commented Apr 27, 2025

Address openshift/operator-framework-operator-controller#329

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@jianzhangbjz jianzhangbjz requested a review from a team as a code owner April 27, 2025 10:17
Copy link

netlify bot commented Apr 27, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 54548e2
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/680ee10ada13a20008c3292d
😎 Deploy Preview https://deploy-preview-1939--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jianzhangbjz jianzhangbjz changed the title set the SElinux type Patch fix: set the SElinux type Apr 27, 2025
@jianzhangbjz jianzhangbjz changed the title Patch fix: set the SElinux type Patch fix: 🐛 set the SElinux type Apr 27, 2025
@jianzhangbjz jianzhangbjz changed the title Patch fix: 🐛 set the SElinux type 🐛 set the SElinux type Apr 27, 2025
Signed-off-by: Jian Zhang <[email protected]>
@@ -16,3 +16,6 @@
- op: add
path: /spec/template/spec/containers/0/args/-
value: "--tls-key=/var/certs/tls.key"
- op: add
path: /spec/template/spec/securityContext/seLinuxOptions
value: {"type":"spc_t"}
Copy link
Contributor

@camilamacedo86 camilamacedo86 Apr 29, 2025

Choose a reason for hiding this comment

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

Hey 👋

I wanted to share a quick note about this part of the change:

seLinuxOptions:
  type: spc_t

Just a heads up: in SELinux, spc_t stands for "Super Privileged Container". It grants elevated privileges and relaxes some of the default confinement SELinux provides — which might not be something we want to apply by default, especially if it's not strictly necessary.

That said, I totally get that you're trying to address an issue here — but I think the root cause may not be related to SELinux permissions. The error message you're seeing appears to be TLS-related:

error creating image source: pinging container registry https://my-route-jian.apps.heli-419.qe.devcluster.openshift.com/v2/: tls: failed to verify certificate: x509: certificate signed by unknown authority

This looks more like a trust/handshake problem with the registry's certificate rather than a container-level permissions issue. I'm not sure how granting additional SELinux privileges would help in this scenario. We might still unable to get the right cert, but how could that solve it out? What are your thoughts about this one?

Moreover, it is an issue that does not occur in upstream,, so I do not think that, if required, we should add the path to grant permissions here.

Would you mind explaining a bit more about why you think this is the right solution? Totally open to learning more if there’s something I’m missing.

Thanks! 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we close this one as deferred?
@tmshort @jianzhangbjz WDYT?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for reviewing! The root cause of this issue is Permission denied, which means the container's default process cannot access the /etc/docker.

jiazha-mac:~ jiazha$ oc exec catalogd-controller-manager-5c768bcf55-fk9ws -- ls -R /etc/docker
ls: cannot open directory '/etc/docker': Permission denied

I closed it since it is an issue that does not occur in upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants