Support mount propagation

fixex #185

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
Yanqiang Miao
2017-09-06 16:48:23 +08:00
parent 59e75d8c5e
commit 9da460ec0a
7 changed files with 451 additions and 271 deletions

View File

@@ -21,6 +21,7 @@ limitations under the License.
package api
import (
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -1408,7 +1409,9 @@ func (in *Container) DeepCopyInto(out *Container) {
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
*out = make([]VolumeMount, len(*in))
copy(*out, *in)
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.LivenessProbe != nil {
in, out := &in.LivenessProbe, &out.LivenessProbe
@@ -1787,7 +1790,15 @@ func (in *DownwardAPIVolumeSource) DeepCopy() *DownwardAPIVolumeSource {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) {
*out = *in
out.SizeLimit = in.SizeLimit.DeepCopy()
if in.SizeLimit != nil {
in, out := &in.SizeLimit, &out.SizeLimit
if *in == nil {
*out = nil
} else {
*out = new(resource.Quantity)
**out = (*in).DeepCopy()
}
}
return
}
@@ -5922,6 +5933,15 @@ func (in *Volume) DeepCopy() *Volume {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeMount) DeepCopyInto(out *VolumeMount) {
*out = *in
if in.MountPropagation != nil {
in, out := &in.MountPropagation, &out.MountPropagation
if *in == nil {
*out = nil
} else {
*out = new(MountPropagationMode)
**out = **in
}
}
return
}