Merge pull request #111090 from kinvolk/rata/userns-support-2022

Add support for user namespaces phase 1 (KEP 127)

Kubernetes-commit: 4b6134b6dc497f48916d4b1667d4c9a461aaa36a
This commit is contained in:
Kubernetes Publisher 2022-08-03 13:05:47 -07:00
commit 07171f82e7
4 changed files with 16 additions and 4 deletions

View File

@ -61,6 +61,7 @@ type PodSpecApplyConfiguration struct {
TopologySpreadConstraints []TopologySpreadConstraintApplyConfiguration `json:"topologySpreadConstraints,omitempty"`
SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty"`
OS *PodOSApplyConfiguration `json:"os,omitempty"`
HostUsers *bool `json:"hostUsers,omitempty"`
}
// PodSpecApplyConfiguration constructs an declarative configuration of the PodSpec type for use with
@ -407,3 +408,11 @@ func (b *PodSpecApplyConfiguration) WithOS(value *PodOSApplyConfiguration) *PodS
b.OS = value
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
}

View File

@ -5762,6 +5762,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: hostPID
type:
scalar: boolean
- name: hostUsers
type:
scalar: boolean
- name: hostname
type:
scalar: string

4
go.mod
View File

@ -24,7 +24,7 @@ require (
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
google.golang.org/protobuf v1.28.0
k8s.io/api v0.0.0-20220803001323-7488a8ce4dc3
k8s.io/api v0.0.0-20220803201543-e590d1f4884a
k8s.io/apimachinery v0.0.0-20220802201132-b5410464b8fe
k8s.io/klog/v2 v2.70.1
k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8
@ -61,6 +61,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20220803001323-7488a8ce4dc3
k8s.io/api => k8s.io/api v0.0.0-20220803201543-e590d1f4884a
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220802201132-b5410464b8fe
)

4
go.sum
View File

@ -477,8 +477,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20220803001323-7488a8ce4dc3 h1:sut2KNwiqpS3kcHQbQYusZ+7P108TWRPgzIAgUacpD0=
k8s.io/api v0.0.0-20220803001323-7488a8ce4dc3/go.mod h1:zM75l97GRtsYnJd33QhbbeOEqEScEouIzD3Yff6qSao=
k8s.io/api v0.0.0-20220803201543-e590d1f4884a h1:5u4HsLZQUjSBt7LW9trcHSm81YD0VsinqGG42EhRMMc=
k8s.io/api v0.0.0-20220803201543-e590d1f4884a/go.mod h1:zM75l97GRtsYnJd33QhbbeOEqEScEouIzD3Yff6qSao=
k8s.io/apimachinery v0.0.0-20220802201132-b5410464b8fe h1:X6c3L2p8kerCDZqpcDMIKMEJgb2qDHRP4cc1uZYcWm0=
k8s.io/apimachinery v0.0.0-20220802201132-b5410464b8fe/go.mod h1:lE2kjTmALiRf8OG82W24K4QHQUlQX8ucdy7xRtD3zbE=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=