From 828c3cb11b78326772b5c21c95fed4e3c81e5b2a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 7 Jul 2022 21:43:51 +0200 Subject: [PATCH] pkg/apis, staging: add HostUsers to pod spec It is used to request that a pod runs in a unique user namespace. Signed-off-by: Giuseppe Scrivano Signed-off-by: Rodrigo Campos Co-authored-by: Rodrigo Campos Kubernetes-commit: 9e9b23fd3ca6c0c58ee401b18a65422c0564bec0 --- applyconfigurations/core/v1/podspec.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/applyconfigurations/core/v1/podspec.go b/applyconfigurations/core/v1/podspec.go index 015859e9..d3d3e028 100644 --- a/applyconfigurations/core/v1/podspec.go +++ b/applyconfigurations/core/v1/podspec.go @@ -41,6 +41,7 @@ type PodSpecApplyConfiguration struct { HostNetwork *bool `json:"hostNetwork,omitempty"` HostPID *bool `json:"hostPID,omitempty"` HostIPC *bool `json:"hostIPC,omitempty"` + HostUsers *bool `json:"hostUsers,omitempty"` ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty"` SecurityContext *PodSecurityContextApplyConfiguration `json:"securityContext,omitempty"` ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` @@ -207,6 +208,14 @@ func (b *PodSpecApplyConfiguration) WithHostNetwork(value bool) *PodSpecApplyCon return b } +// WithHostUsers sets the HostUsers field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HostUsers field is set to the value of the last call. +func (b *PodSpecApplyConfiguration) WithHostUsers(value *bool) *PodSpecApplyConfiguration { + b.HostUsers = value + return b +} + // WithHostPID sets the HostPID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HostPID field is set to the value of the last call.