Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -19,10 +19,10 @@ go_library(
"//pkg/volume/util:go_default_library",
"//pkg/volume/util/recyclerclient:go_default_library",
"//pkg/volume/validation:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/api/core/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
],
)
@@ -35,12 +35,12 @@ go_test(
"//pkg/util/mount:go_default_library",
"//pkg/volume:go_default_library",
"//pkg/volume/testing:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
"//staging/src/k8s.io/api/core/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library",
],
)

View File

@@ -8,3 +8,4 @@ reviewers:
- rootfs
- jingxu97
- msau42
- dixudx

View File

@@ -132,7 +132,7 @@ func (plugin *hostPathPlugin) NewUnmounter(volName string, podUID types.UID) (vo
// HostPath recycling only works in single node clusters and is meant for testing purposes only.
func (plugin *hostPathPlugin) Recycle(pvName string, spec *volume.Spec, eventRecorder recyclerclient.RecycleEventRecorder) error {
if spec.PersistentVolume == nil || spec.PersistentVolume.Spec.HostPath == nil {
return fmt.Errorf("spec.PersistentVolumeSource.HostPath is nil")
return fmt.Errorf("spec.PersistentVolume.Spec.HostPath is nil")
}
pod := plugin.config.RecyclerPodTemplate

View File

@@ -17,7 +17,6 @@ limitations under the License.
package host_path
import (
"errors"
"fmt"
"os"
"testing"
@@ -319,92 +318,6 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) {
}
}
type fakeFileTypeChecker struct {
desiredType string
}
func (fftc *fakeFileTypeChecker) Mount(source string, target string, fstype string, options []string) error {
return nil
}
func (fftc *fakeFileTypeChecker) Unmount(target string) error {
return nil
}
func (fftc *fakeFileTypeChecker) List() ([]utilmount.MountPoint, error) {
return nil, nil
}
func (fftc *fakeFileTypeChecker) IsMountPointMatch(mp utilmount.MountPoint, dir string) bool {
return false
}
func (fftc *fakeFileTypeChecker) IsNotMountPoint(file string) (bool, error) {
return false, nil
}
func (fftc *fakeFileTypeChecker) IsLikelyNotMountPoint(file string) (bool, error) {
return false, nil
}
func (fftc *fakeFileTypeChecker) DeviceOpened(pathname string) (bool, error) {
return false, nil
}
func (fftc *fakeFileTypeChecker) PathIsDevice(pathname string) (bool, error) {
return false, nil
}
func (fftc *fakeFileTypeChecker) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
return "fake", nil
}
func (fftc *fakeFileTypeChecker) MakeRShared(path string) error {
return nil
}
func (fftc *fakeFileTypeChecker) MakeFile(pathname string) error {
return nil
}
func (fftc *fakeFileTypeChecker) MakeDir(pathname string) error {
return nil
}
func (fftc *fakeFileTypeChecker) ExistsPath(pathname string) (bool, error) {
return true, nil
}
func (fftc *fakeFileTypeChecker) GetFileType(_ string) (utilmount.FileType, error) {
return utilmount.FileType(fftc.desiredType), nil
}
func (fftc *fakeFileTypeChecker) PrepareSafeSubpath(subPath utilmount.Subpath) (newHostPath string, cleanupAction func(), err error) {
return "", nil, nil
}
func (fftc *fakeFileTypeChecker) CleanSubPaths(_, _ string) error {
return nil
}
func (fftc *fakeFileTypeChecker) SafeMakeDir(_, _ string, _ os.FileMode) error {
return nil
}
func (fftc *fakeFileTypeChecker) GetMountRefs(pathname string) ([]string, error) {
return nil, errors.New("not implemented")
}
func (fftc *fakeFileTypeChecker) GetFSGroup(pathname string) (int64, error) {
return -1, errors.New("not implemented")
}
func (fftc *fakeFileTypeChecker) GetSELinuxSupport(pathname string) (bool, error) {
return false, errors.New("not implemented")
}
func (fftc *fakeFileTypeChecker) GetMode(pathname string) (os.FileMode, error) {
return 0, errors.New("not implemented")
}
func setUp() error {
err := os.MkdirAll("/tmp/ExistingFolder", os.FileMode(0755))
if err != nil {
@@ -473,7 +386,11 @@ func TestOSFileTypeChecker(t *testing.T) {
}
for i, tc := range testCases {
fakeFTC := &fakeFileTypeChecker{desiredType: tc.desiredType}
fakeFTC := &utilmount.FakeMounter{
Filesystem: map[string]utilmount.FileType{
tc.path: utilmount.FileType(tc.desiredType),
},
}
oftc := newFileTypeChecker(tc.path, fakeFTC)
path := oftc.GetPath()