Repository navigation
charts: let OpenShift's SCC assign pod IDs #180
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
Changes from 2 commits
6df0f8a
1cf843f
56f8c7a
7fc7e85
add6537
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,8 +70,10 @@ spec: | |
| serviceAccountName: {{ include "substrate.fullname" (list "k8s-credential-provider" .) }} | ||
| {{- with include "substrate.imagePullSecrets" . }}{{- . | nindent 6 }}{{- end }} | ||
| securityContext: | ||
| {{- if include "substrate.pinIDs" . }} | ||
| runAsUser: 65532 | ||
| runAsGroup: 65532 | ||
| {{- end }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pod may not need the OpenShift check. ko builds it on If you drop
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 56f8c7a. The credential provider now sets only One difference: kubelet now writes its credential bundle as 0644 instead of 0600, the same as for the other three pods. |
||
| runAsNonRoot: true | ||
| containers: | ||
| - name: k8s-credential-provider | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,6 +206,24 @@ tests: | |
| content: | ||
| name: statusz | ||
| containerPort: 4040 | ||
| - it: leaves pod IDs to OpenShift's SCC | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional: nothing checks that the IDs stay on vanilla Kubernetes. I made
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ooof. Yeah, also this. Hang on.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in add6537. One test checks that RustFS keeps its IDs off OpenShift. Another checks that the credential provider sets no IDs. Your mutation now fails the RustFS test. |
||
| templates: | ||
| - k8s-credential-provider.yaml | ||
| - rustfs.yaml | ||
| documentSelector: | ||
| path: kind | ||
| value: Deployment | ||
| matchMany: true | ||
| capabilities: | ||
| apiVersions: | ||
| - security.openshift.io/v1 | ||
| asserts: | ||
| - notExists: | ||
| path: spec.template.spec.securityContext.runAsUser | ||
| - notExists: | ||
| path: spec.template.spec.securityContext.runAsGroup | ||
| - notExists: | ||
| path: spec.template.spec.securityContext.fsGroup | ||
| - it: stops OTLP push without an endpoint but keeps the scraped metrics | ||
| template: ate-controller.yaml | ||
| documentSelector: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the
anyuidupgrade note from the PR description go here too? The repo has no CHANGELOG, so after merge this paragraph is where an OpenShift operator will look. Anyone who keeps the grant gets an unwritable RustFS PVC on a new install.Also, every test run was a fresh install. Upgrading an
anyuidinstall with data owned by 10001 should still work, because kubelet changes the volume's group to the new fsGroup. Drivers that skip ownership changes don't do that, and many NFS setups are like that. Worth a test, or a line in the note.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ Good catch. Hang on!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to the README in 7fc7e85. I tested the upgrade with RustFS data written as UID 10001:
anyuidis kept, RustFS runs as UID 10001 and reads and writes.So the README says to keep
anyuidon storage that skips the change.