mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rebase: update kubernetes dep to 1.24.0
As kubernetes 1.24.0 is released, updating kubernetes dependencies to 1.24.0 updates: #3086 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
fc1529f268
commit
c4f79d455f
6
vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go
generated
vendored
@ -24,9 +24,11 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics"
|
||||
"k8s.io/kubernetes/pkg/volume/util/fsquota"
|
||||
)
|
||||
|
||||
@ -71,9 +73,13 @@ func DiskUsage(path string) (UsageInfo, error) {
|
||||
// First check whether the quota system knows about this directory
|
||||
// A nil quantity or error means that the path does not support quotas
|
||||
// or xfs_quota tool is missing and we should use other mechanisms.
|
||||
startTime := time.Now()
|
||||
consumption, _ := fsquota.GetConsumption(path)
|
||||
if consumption != nil {
|
||||
usage.Bytes = consumption.Value()
|
||||
defer servermetrics.CollectVolumeStatCalDuration("fsquota", startTime)
|
||||
} else {
|
||||
defer servermetrics.CollectVolumeStatCalDuration("du", startTime)
|
||||
}
|
||||
|
||||
inodes, _ := fsquota.GetInodes(path)
|
||||
|
4
vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go
generated
vendored
@ -27,9 +27,9 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
"golang.org/x/sys/unix"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/kubernetes/pkg/util/selinux"
|
||||
"k8s.io/mount-utils"
|
||||
utilpath "k8s.io/utils/path"
|
||||
)
|
||||
@ -263,7 +263,7 @@ func GetSELinux(path string, mountInfoFilename string, selinuxEnabled seLinuxEna
|
||||
// GetSELinuxSupport returns true if given path is on a mount that supports
|
||||
// SELinux.
|
||||
func (hu *HostUtil) GetSELinuxSupport(pathname string) (bool, error) {
|
||||
return GetSELinux(pathname, procMountInfoPath, selinux.SELinuxEnabled)
|
||||
return GetSELinux(pathname, procMountInfoPath, selinux.GetEnabled)
|
||||
}
|
||||
|
||||
// GetOwner returns the integer ID for the user and group of the given path
|
||||
|
1
vendor/k8s.io/kubernetes/pkg/volume/util/subpath/OWNERS
generated
vendored
1
vendor/k8s.io/kubernetes/pkg/volume/util/subpath/OWNERS
generated
vendored
@ -10,4 +10,3 @@ approvers:
|
||||
- jingxu97
|
||||
- saad-ali
|
||||
- jsafrane
|
||||
|
||||
|
7
vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go
generated
vendored
@ -260,7 +260,12 @@ func doCleanSubPaths(mounter mount.Interface, podDir string, volumeName string)
|
||||
|
||||
// scan /var/lib/kubelet/pods/<uid>/volume-subpaths/<volume>/<container name>/*
|
||||
fullContainerDirPath := filepath.Join(subPathDir, containerDir.Name())
|
||||
err = filepath.Walk(fullContainerDirPath, func(path string, info os.FileInfo, _ error) error {
|
||||
// The original traversal method here was ReadDir, which was not so robust to handle some error such as "stale NFS file handle",
|
||||
// so it was replaced with filepath.Walk in a later patch, which can pass through error and handled by the callback WalkFunc.
|
||||
// After go 1.16, WalkDir was introduced, it's more effective than Walk because the callback WalkDirFunc is called before
|
||||
// reading a directory, making it save some time when a container's subPath contains lots of dirs.
|
||||
// See https://github.com/kubernetes/kubernetes/pull/71804 and https://github.com/kubernetes/kubernetes/issues/107667 for more details.
|
||||
err = filepath.WalkDir(fullContainerDirPath, func(path string, info os.DirEntry, _ error) error {
|
||||
if path == fullContainerDirPath {
|
||||
// Skip top level directory
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user