crio: set minimum_mappable_uid/minimum_mappable_gid#2862
crio: set minimum_mappable_uid/minimum_mappable_gid#2862nalind wants to merge 1 commit intoopenshift:masterfrom
Conversation
Set minimum_mappable_uid/minimum_mappable_gid to 1000000000, the start of the ranges we assign to namespaces in the default configuration, for use with unprivileged builds. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
|
@nalind do I understand correctly that these settings apply when specifying What I really need is support for |
|
The current aim in openshift/openshift-controller-manager#173 is to construct those mappings using the ranges that have been allocated for the OpenShift namespace in which the build is being run. Are there cases outside of builds where |
|
Hmm, the |
|
/test e2e-agnostic-upgrade |
Yes. "Legacy" workloads that require to run as uid 0 (in container's user namespace). Telco has a huge demand for this. My team is working on operationalising IDM (FreeIPA) for OpenShift, and we want to use a systemd-based workload running in user namespace to avoid (a) big up-front engineering effort to re-architect FreeIPA as "cloud native" app and (b) avoid years of increased maintenance and support costs as we maintain the same application under two separate architectures (because the existing architecture will be what we deliver in RHEL, for the forseeable future at least). And the eventual goal is to offer IDM as a managed service - so user namespace isolation of workloads is essential to support secure multi-tenancy and avoid workloads running as privilege users in the host user namespace.
Thanks for clarifying. That's an interesting approach. It is feasible for operators or other agents that create the workload to observe the host uid assignment of the project namespace and configure the users-ns mode to map into that range. But it is a burden that could (should?) be avoided. Furthermore the default size of the slice is 10000, less than the 65536 required for "full linux system in a container" workloads (which may require user 65534 - "nobody" - to be mapped). You can "chop up" the UID allocation to create non-contiguous mapping ranges to cover the UIDs the workload actually uses (actually using > 10000 UIDs is very unlikely), but this creates even more complexity for the controller. In any case, I tested this PR using a pod configuration that explicitly mentions the project namespace UIDs in both the
I haven't found it either. As you say, it is likely a side-effect of |
|
/retest |
|
@nalind: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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/test-infra repository. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mrunalp, nalind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Further to the discussion in cri-o/cri-o#5493, I'm not sure userns-mode |
|
Agreed. Closing this one to ensure it doesn't get merged in the meantime. |
- What I did
Set minimum_mappable_uid/minimum_mappable_gid to 1000000000, the start of the ranges we assign to namespaces in the default configuration, for use with unprivileged builds. Follow-on to #2805, part of https://issues.redhat.com/browse/OCPNODE-683.
- How to verify it
Builds should be able to specify "io.kubernetes.cri-o.userns-mode" annotations in their build pods, using "private:..." values that specify mapping host IDs at or above 1000000000 for the build pod's containers.
- Description for the changelog
crio: set minimum_mappable_uid and minimum_mappable_gid to 1000000000