mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-22 05:10:32 +00:00
api: KEP-3857: Recursive Read-only (RRO) mounts
This commit modifies the following files: - pkg/apis/core/types.go - staging/src/k8s.io/api/core/v1/types.go Other changes were auto-generated by running `make update`. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> Kubernetes-commit: d940886d0a4ee9aa8a7ca075fee175b002baf883
This commit is contained in:
parent
110b75b14e
commit
3be09aa8db
@ -36,6 +36,7 @@ type ContainerStatusApplyConfiguration struct {
|
||||
Started *bool `json:"started,omitempty"`
|
||||
AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"`
|
||||
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
|
||||
VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerStatusApplyConfiguration constructs an declarative configuration of the ContainerStatus type for use with
|
||||
@ -131,3 +132,16 @@ func (b *ContainerStatusApplyConfiguration) WithResources(value *ResourceRequire
|
||||
b.Resources = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithVolumeMounts adds the given value to the VolumeMounts field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the VolumeMounts field.
|
||||
func (b *ContainerStatusApplyConfiguration) WithVolumeMounts(values ...*VolumeMountStatusApplyConfiguration) *ContainerStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithVolumeMounts")
|
||||
}
|
||||
b.VolumeMounts = append(b.VolumeMounts, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
48
applyconfigurations/core/v1/noderuntimeclass.go
Normal file
48
applyconfigurations/core/v1/noderuntimeclass.go
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// NodeRuntimeClassApplyConfiguration represents an declarative configuration of the NodeRuntimeClass type for use
|
||||
// with apply.
|
||||
type NodeRuntimeClassApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Features *NodeRuntimeClassFeaturesApplyConfiguration `json:"features,omitempty"`
|
||||
}
|
||||
|
||||
// NodeRuntimeClassApplyConfiguration constructs an declarative configuration of the NodeRuntimeClass type for use with
|
||||
// apply.
|
||||
func NodeRuntimeClass() *NodeRuntimeClassApplyConfiguration {
|
||||
return &NodeRuntimeClassApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *NodeRuntimeClassApplyConfiguration) WithName(value string) *NodeRuntimeClassApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFeatures sets the Features 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 Features field is set to the value of the last call.
|
||||
func (b *NodeRuntimeClassApplyConfiguration) WithFeatures(value *NodeRuntimeClassFeaturesApplyConfiguration) *NodeRuntimeClassApplyConfiguration {
|
||||
b.Features = value
|
||||
return b
|
||||
}
|
39
applyconfigurations/core/v1/noderuntimeclassfeatures.go
Normal file
39
applyconfigurations/core/v1/noderuntimeclassfeatures.go
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// NodeRuntimeClassFeaturesApplyConfiguration represents an declarative configuration of the NodeRuntimeClassFeatures type for use
|
||||
// with apply.
|
||||
type NodeRuntimeClassFeaturesApplyConfiguration struct {
|
||||
RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty"`
|
||||
}
|
||||
|
||||
// NodeRuntimeClassFeaturesApplyConfiguration constructs an declarative configuration of the NodeRuntimeClassFeatures type for use with
|
||||
// apply.
|
||||
func NodeRuntimeClassFeatures() *NodeRuntimeClassFeaturesApplyConfiguration {
|
||||
return &NodeRuntimeClassFeaturesApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRecursiveReadOnlyMounts sets the RecursiveReadOnlyMounts 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 RecursiveReadOnlyMounts field is set to the value of the last call.
|
||||
func (b *NodeRuntimeClassFeaturesApplyConfiguration) WithRecursiveReadOnlyMounts(value bool) *NodeRuntimeClassFeaturesApplyConfiguration {
|
||||
b.RecursiveReadOnlyMounts = &value
|
||||
return b
|
||||
}
|
@ -36,6 +36,7 @@ type NodeStatusApplyConfiguration struct {
|
||||
VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"`
|
||||
VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"`
|
||||
Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"`
|
||||
RuntimeClasses []NodeRuntimeClassApplyConfiguration `json:"runtimeClasses,omitempty"`
|
||||
}
|
||||
|
||||
// NodeStatusApplyConfiguration constructs an declarative configuration of the NodeStatus type for use with
|
||||
@ -153,3 +154,16 @@ func (b *NodeStatusApplyConfiguration) WithConfig(value *NodeConfigStatusApplyCo
|
||||
b.Config = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuntimeClasses adds the given value to the RuntimeClasses field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the RuntimeClasses field.
|
||||
func (b *NodeStatusApplyConfiguration) WithRuntimeClasses(values ...*NodeRuntimeClassApplyConfiguration) *NodeStatusApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithRuntimeClasses")
|
||||
}
|
||||
b.RuntimeClasses = append(b.RuntimeClasses, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
// VolumeMountApplyConfiguration represents an declarative configuration of the VolumeMount type for use
|
||||
// with apply.
|
||||
type VolumeMountApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
ReadOnly *bool `json:"readOnly,omitempty"`
|
||||
MountPath *string `json:"mountPath,omitempty"`
|
||||
SubPath *string `json:"subPath,omitempty"`
|
||||
MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"`
|
||||
SubPathExpr *string `json:"subPathExpr,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
ReadOnly *bool `json:"readOnly,omitempty"`
|
||||
RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"`
|
||||
MountPath *string `json:"mountPath,omitempty"`
|
||||
SubPath *string `json:"subPath,omitempty"`
|
||||
MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"`
|
||||
SubPathExpr *string `json:"subPathExpr,omitempty"`
|
||||
}
|
||||
|
||||
// VolumeMountApplyConfiguration constructs an declarative configuration of the VolumeMount type for use with
|
||||
@ -55,6 +56,14 @@ func (b *VolumeMountApplyConfiguration) WithReadOnly(value bool) *VolumeMountApp
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRecursiveReadOnly sets the RecursiveReadOnly 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 RecursiveReadOnly field is set to the value of the last call.
|
||||
func (b *VolumeMountApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountApplyConfiguration {
|
||||
b.RecursiveReadOnly = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMountPath sets the MountPath 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 MountPath field is set to the value of the last call.
|
||||
|
70
applyconfigurations/core/v1/volumemountstatus.go
Normal file
70
applyconfigurations/core/v1/volumemountstatus.go
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// VolumeMountStatusApplyConfiguration represents an declarative configuration of the VolumeMountStatus type for use
|
||||
// with apply.
|
||||
type VolumeMountStatusApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
MountPath *string `json:"mountPath,omitempty"`
|
||||
ReadOnly *bool `json:"readOnly,omitempty"`
|
||||
RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"`
|
||||
}
|
||||
|
||||
// VolumeMountStatusApplyConfiguration constructs an declarative configuration of the VolumeMountStatus type for use with
|
||||
// apply.
|
||||
func VolumeMountStatus() *VolumeMountStatusApplyConfiguration {
|
||||
return &VolumeMountStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *VolumeMountStatusApplyConfiguration) WithName(value string) *VolumeMountStatusApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMountPath sets the MountPath 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 MountPath field is set to the value of the last call.
|
||||
func (b *VolumeMountStatusApplyConfiguration) WithMountPath(value string) *VolumeMountStatusApplyConfiguration {
|
||||
b.MountPath = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithReadOnly sets the ReadOnly 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 ReadOnly field is set to the value of the last call.
|
||||
func (b *VolumeMountStatusApplyConfiguration) WithReadOnly(value bool) *VolumeMountStatusApplyConfiguration {
|
||||
b.ReadOnly = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRecursiveReadOnly sets the RecursiveReadOnly 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 RecursiveReadOnly field is set to the value of the last call.
|
||||
func (b *VolumeMountStatusApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountStatusApplyConfiguration {
|
||||
b.RecursiveReadOnly = &value
|
||||
return b
|
||||
}
|
@ -5080,6 +5080,14 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ContainerState
|
||||
default: {}
|
||||
- name: volumeMounts
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.core.v1.VolumeMountStatus
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- mountPath
|
||||
- name: io.k8s.api.core.v1.DaemonEndpoint
|
||||
map:
|
||||
fields:
|
||||
@ -6065,6 +6073,22 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.DaemonEndpoint
|
||||
default: {}
|
||||
- name: io.k8s.api.core.v1.NodeRuntimeClass
|
||||
map:
|
||||
fields:
|
||||
- name: features
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.NodeRuntimeClassFeatures
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.core.v1.NodeRuntimeClassFeatures
|
||||
map:
|
||||
fields:
|
||||
- name: recursiveReadOnlyMounts
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: io.k8s.api.core.v1.NodeSelector
|
||||
map:
|
||||
fields:
|
||||
@ -6187,6 +6211,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: phase
|
||||
type:
|
||||
scalar: string
|
||||
- name: runtimeClasses
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.core.v1.NodeRuntimeClass
|
||||
elementRelationship: atomic
|
||||
- name: volumesAttached
|
||||
type:
|
||||
list:
|
||||
@ -8186,12 +8216,32 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: readOnly
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: recursiveReadOnly
|
||||
type:
|
||||
scalar: string
|
||||
- name: subPath
|
||||
type:
|
||||
scalar: string
|
||||
- name: subPathExpr
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.VolumeMountStatus
|
||||
map:
|
||||
fields:
|
||||
- name: mountPath
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: name
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: readOnly
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: recursiveReadOnly
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.VolumeNodeAffinity
|
||||
map:
|
||||
fields:
|
||||
|
@ -801,6 +801,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.NodeConfigStatusApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeDaemonEndpoints"):
|
||||
return &applyconfigurationscorev1.NodeDaemonEndpointsApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeClass"):
|
||||
return &applyconfigurationscorev1.NodeRuntimeClassApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeRuntimeClassFeatures"):
|
||||
return &applyconfigurationscorev1.NodeRuntimeClassFeaturesApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeSelector"):
|
||||
return &applyconfigurationscorev1.NodeSelectorApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("NodeSelectorRequirement"):
|
||||
@ -983,6 +987,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.VolumeDeviceApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeMount"):
|
||||
return &applyconfigurationscorev1.VolumeMountApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeMountStatus"):
|
||||
return &applyconfigurationscorev1.VolumeMountStatusApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeNodeAffinity"):
|
||||
return &applyconfigurationscorev1.VolumeNodeAffinityApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("VolumeProjection"):
|
||||
|
Loading…
Reference in New Issue
Block a user