mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: update kubernetes to v1.20.0
updated kubernetes packages to latest release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
4abe128bd8
commit
83559144b1
go.modgo.summodules.txt
vendor
github.com
aws
aws-sdk-go
LICENSE.txtNOTICE.txttypes.gourl.gourl_1_7.goversion.go
aws
awserr
awsutil
client
config.gocontext_1_5.gocontext_1_9.gocontext_background_1_5.gocontext_background_1_7.gocontext_sleep.goconvert_types.gocredentials
chain_provider.gocontext_background_go1.5.gocontext_background_go1.7.gocontext_go1.5.gocontext_go1.9.gocredentials.goenv_provider.goexample.inishared_credentials_provider.gostatic_provider.go
doc.goendpoints
decode.godefaults.godep_service_ids.godoc.goendpoints.golegacy_regions.gov3model.gov3model_codegen.go
errors.gojsonvalue.gologger.gorequest
connection_reset_error.gohandlers.gohttp_request.gooffset_reader.gorequest.gorequest_1_7.gorequest_1_8.gorequest_context.gorequest_context_1_6.gorequest_pagination.goretryer.gotimeout_read_closer.govalidation.gowaiter.go
signer
v4
internal
context
ini
ast.gocomma_token.gocomment_token.godoc.goempty_token.goexpression.gofuzz.goini.goini_lexer.goini_parser.goliteral_tokens.gonewline_token.gonumber_helper.goop_tokens.goparse_error.goparse_stack.gosep_tokens.goskipper.gostatement.govalue_util.govisitor.gowalker.gows_token.go
sdkio
sdkmath
sdkrand
shareddefaults
strings
sync
singleflight
private
protocol
service
blang
coreos
go-systemd
pkg
evanphx
gogo
protobuf
gogoproto
protoc-gen-gogo
golang
protobuf
proto
google
googleapis
gnostic
compiler
extensions
openapiv2
jmespath
go-jmespath
json-iterator
go
pmezard
go-difflib
prometheus
client_golang
prometheus
common
model
procfs
.golangci.ymlCODE_OF_CONDUCT.mdMakefile.commoncpuinfo.gocpuinfo_armx.gocpuinfo_mipsx.gocpuinfo_others.gocpuinfo_ppcx.gocpuinfo_s390x.gocpuinfo_x86.gocrypto.gofixtures.ttarfscache.gogo.modgo.sumkernel_random.goloadavg.gomdstat.gomountinfo.gomountstats.gonet_conntrackstat.gonet_softnet.gonet_udp.gonet_unix.goproc.goproc_cgroup.goproc_fdinfo.goproc_maps.goproc_smaps.goproc_status.goswaps.go
internal
util
stretchr
go.etcd.io
etcd
NOTICE
auth
authpb
clientv3
README.mdauth.go
balancer
client.gocluster.gocompact_op.gocompare.goconfig.gocredentials
doc.gokv.golease.gologger.gomaintenance.goop.gooptions.goretry.goretry_interceptor.gosort.gotxn.goutils.gowatch.goetcdserver
api
v3rpc
rpctypes
etcdserverpb
mvcc
pkg
logutil
discard_logger.golog_level.gologger.gomerge_logger.gopackage_logger.gozap.gozap_grpc.gozap_journal.gozap_raft.go
systemd
types
raft
go.uber.org
atomic
.codecov.yml.gitignore.travis.ymlLICENSE.txtMakefileREADME.mdatomic.goerror.goglide.lockglide.yamlstring.go
multierr
.codecov.yml.gitignore.travis.ymlCHANGELOG.mdLICENSE.txtMakefileREADME.mderror.goglide.lockglide.yaml
zap
.codecov.yml.gitignore.readme.tmpl.travis.ymlCHANGELOG.mdCODE_OF_CONDUCT.mdCONTRIBUTING.mdFAQ.mdLICENSE.txtMakefileREADME.mdarray.go
buffer
check_license.shconfig.godoc.goencoder.goerror.gofield.goflag.goglide.lockglide.yamlglobal.goglobal_go112.goglobal_prego112.gohttp_handler.gointernal
level.gologger.gooptions.gosink.gostacktrace.gosugar.gotime.gowriter.gozapcore
golang.org
x
crypto
net
html
http2
idna
websocket
oauth2
sys
cpu
byteorder.gocpu.gocpu_aix.gocpu_arm.gocpu_arm64.gocpu_linux.gocpu_linux_mips64x.gocpu_linux_ppc64x.gocpu_linux_s390x.gocpu_mips64x.gocpu_mipsx.gocpu_netbsd_arm64.gocpu_other_arm.gocpu_other_arm64.gocpu_other_mips64x.gocpu_ppc64x.gocpu_riscv64.gocpu_s390x.gocpu_wasm.gocpu_x86.gocpu_zos.gocpu_zos_s390x.go
unix
asm_openbsd_mips64.sfcntl_darwin.gofcntl_linux_32bit.gogccgo.gogccgo_c.cioctl.gomkall.shmkerrors.shsockcmsg_unix_other.gosyscall.gosyscall_aix.gosyscall_bsd.gosyscall_darwin.1_12.gosyscall_darwin.gosyscall_darwin_386.1_11.gosyscall_darwin_386.gosyscall_darwin_amd64.1_11.gosyscall_darwin_amd64.gosyscall_darwin_arm.1_11.gosyscall_darwin_arm.gosyscall_darwin_arm64.1_11.gosyscall_darwin_arm64.gosyscall_dragonfly.gosyscall_freebsd.gosyscall_illumos.gosyscall_linux.gosyscall_linux_386.gosyscall_linux_arm.gosyscall_linux_gc_arm.gosyscall_netbsd.gosyscall_openbsd.gosyscall_openbsd_mips64.gosyscall_solaris.gozerrors_darwin_386.gozerrors_darwin_amd64.gozerrors_darwin_arm.gozerrors_darwin_arm64.gozerrors_dragonfly_amd64.gozerrors_freebsd_386.gozerrors_freebsd_amd64.gozerrors_freebsd_arm.gozerrors_freebsd_arm64.gozerrors_linux.gozerrors_linux_386.gozerrors_linux_amd64.gozerrors_linux_arm.gozerrors_linux_arm64.gozerrors_linux_mips.gozerrors_linux_mips64.gozerrors_linux_mips64le.gozerrors_linux_mipsle.gozerrors_linux_ppc64.gozerrors_linux_ppc64le.gozerrors_linux_riscv64.gozerrors_linux_s390x.gozerrors_linux_sparc64.gozerrors_netbsd_386.gozerrors_netbsd_amd64.gozerrors_netbsd_arm.gozerrors_netbsd_arm64.gozerrors_openbsd_386.gozerrors_openbsd_amd64.gozerrors_openbsd_arm.gozerrors_openbsd_arm64.gozerrors_openbsd_mips64.gozerrors_solaris_amd64.gozsyscall_darwin_386.1_11.gozsyscall_darwin_386.gozsyscall_darwin_386.szsyscall_darwin_amd64.1_11.gozsyscall_darwin_amd64.gozsyscall_darwin_amd64.szsyscall_darwin_arm.1_11.gozsyscall_darwin_arm.gozsyscall_darwin_arm.szsyscall_darwin_arm64.gozsyscall_darwin_arm64.szsyscall_dragonfly_amd64.gozsyscall_illumos_amd64.gozsyscall_linux.gozsyscall_openbsd_mips64.gozsysctl_openbsd_mips64.gozsysnum_darwin_386.gozsysnum_darwin_amd64.gozsysnum_darwin_arm.gozsysnum_darwin_arm64.gozsysnum_dragonfly_amd64.gozsysnum_linux_386.gozsysnum_linux_amd64.gozsysnum_linux_arm.gozsysnum_linux_arm64.gozsysnum_linux_mips.gozsysnum_linux_mips64.gozsysnum_linux_mips64le.gozsysnum_linux_mipsle.gozsysnum_linux_ppc64.gozsysnum_linux_ppc64le.gozsysnum_linux_riscv64.gozsysnum_linux_s390x.gozsysnum_linux_sparc64.gozsysnum_openbsd_mips64.goztypes_darwin_386.goztypes_darwin_amd64.goztypes_darwin_arm.goztypes_darwin_arm64.goztypes_dragonfly_amd64.goztypes_freebsd_arm.goztypes_linux.goztypes_linux_386.goztypes_linux_amd64.goztypes_linux_arm.goztypes_linux_arm64.goztypes_linux_mips.goztypes_linux_mips64.goztypes_linux_mips64le.goztypes_linux_mipsle.goztypes_linux_ppc64.goztypes_linux_ppc64le.goztypes_linux_riscv64.goztypes_linux_s390x.goztypes_linux_sparc64.goztypes_openbsd_mips64.goztypes_solaris_amd64.go
windows
text
encoding
unicode
internal
language
transform
unicode
time
rate
google.golang.org
appengine
internal
genproto
googleapis
rpc
status
grpc
resolver
k8s.io
api
admission
v1
v1beta1
admissionregistration
v1
v1beta1
apiserverinternal
v1alpha1
apps
v1
v1beta1
v1beta2
auditregistration
v1alpha1
authentication
authorization
autoscaling
v1
v2beta1
doc.gogenerated.pb.gogenerated.prototypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.gozz_generated.prerelease-lifecycle.go
v2beta2
batch
v1
v1beta1
v2alpha1
certificates
v1
doc.gogenerated.pb.gogenerated.protoregister.gotypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.go
v1beta1
coordination
core
v1
discovery
v1alpha1
v1beta1
events
v1
doc.gogenerated.pb.gogenerated.protoregister.gotypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.go
v1beta1
extensions
v1beta1
flowcontrol
v1alpha1
v1beta1
networking
v1
generated.pb.gogenerated.protoregister.gotypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.go
v1beta1
node
v1
doc.gogenerated.pb.gogenerated.protoregister.gotypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.go
v1alpha1
v1beta1
policy
v1beta1
rbac
v1
v1alpha1
v1beta1
scheduling
v1
v1alpha1
v1beta1
settings
storage
apimachinery
pkg
api
errors
meta
resource
validation
apis
meta
conversion
fields
labels
runtime
types
util
cache
clock
errors
framer
httpstream
intstr
json
net
runtime
strategicpatch
validation
version
wait
yaml
watch
third_party
forked
golang
reflect
apiserver
pkg
admission
apis
apiserver
audit
audit
authentication
endpoints
features
quota
server
egressselector
storage
OWNERSerrors.go
etcd3
OWNERSapi_object_versioner.gocompact.goerrors.goevent.gohealthcheck.golease_manager.gologger.go
interfaces.goselection_predicate.goutil.gometrics
store.gowatcher.govalue
util
webhook
warning
client-go
discovery
informers
kubernetes
clientset.go
scheme
typed
apiserverinternal
auditregistration
v1alpha1
certificates
core
events
flowcontrol
networking
node
settings
v1alpha1
storage
listers
admissionregistration
v1
v1beta1
apiserverinternal
apps
v1
v1beta1
v1beta2
auditregistration
v1alpha1
autoscaling
batch
certificates
coordination
core
v1
discovery
events
extensions
flowcontrol
v1alpha1
v1beta1
networking
node
policy
rbac
v1
v1alpha1
v1beta1
scheduling
settings
v1alpha1
storage
metadata
pkg
apis
plugin
pkg
client
auth
exec
rest
restmapper
tools
auth
cache
OWNERScontroller.godelta_fifo.goexpiration_cache.gofifo.golisters.gomutation_cache.gomutation_detector.goreflector.goshared_informer.go
clientcmd
leaderelection
metrics
record
remotecommand
watch
transport
util
cloud-provider
component-base
cli
config
featuregate
metrics
counter.godesc.gohttp.goregistry.go
legacyregistry
metric.gooptions.goopts.goprocessstarttime.goprometheus
ratelimiter
testutil
version.gocontroller-manager
cri-api
pkg
apis
runtime
v1alpha2
csi-translation-lib
klog
kube-openapi
pkg
util
kube-scheduler
extender
kubectl
pkg
kubelet
kubernetes
pkg
api
apis
apps
autoscaling
batch
core
OWNERSannotation_key_constants.go
helper
install
pods
resource.gotypes.gov1
validation
zz_generated.deepcopy.goextensions
networking
policy
scheduling
storage
v1
util
cluster
controller
.import-restrictionsBUILDOWNERSclient_builder_dynamic.gocontroller_ref_manager.gocontroller_utils.go
deployment
informer_factory.gonodelifecycle
util
volume
persistentvolume
scheduling
features
kubelet
apis
container
BUILDcache.gocontainer_gc.gocontainer_reference_manager.gohelpers.goos.goref.goresize.goruntime.goruntime_cache.goruntime_cache_fake.gosync_result.go
dockershim
metrics
events
lifecycle
metrics
sysctl
types
util
format
proxy
scheduler
apis
framework
plugins
helper
nodeaffinity
nodename
nodeports
noderesources
v1alpha1
listers
metrics
nodeinfo
util
security
serviceaccount
ssh
util
node
parsers
resizefs
sysctl
volume
BUILDOWNERSnoop_expandable_plugin.goplugins.go
util
BUILDOWNERSatomic_writer.goattach_limit.godevice_util.godevice_util_linux.godevice_util_unsupported.godoc.go
volume.govolume_linux.govolume_unsupported.gofs
fsquota
hostutil
io_util.gometrics.gonested_volumes.gorecyclerclient
resize_util.gosubpath
types
util.govolumepathhandler
test
e2e
framework
.import-restrictionsBUILDcleanup.goexec_util.goframework.gogoogle_compute.go
kubectl
log.golog
log_size_monitoring.gometrics
node
nodes_util.gopod
pods.goports.gopsp.gopv
resource
resource_usage_gatherer.goskipper
ssh
test_context.gotestfiles
util.gostorage
system
utils
third_party
mount-utils
LICENSEOWNERSREADME.mdSECURITY_CONTACTScode-of-conduct.mddoc.gofake_mounter.gogo.modgo.summount.gomount_helper_common.gomount_helper_unix.gomount_helper_windows.gomount_linux.gomount_unsupported.gomount_windows.go
utils
sigs.k8s.io
apiserver-network-proxy
structured-merge-diff
209
vendor/github.com/prometheus/procfs/proc_maps.go
generated
vendored
Normal file
209
vendor/github.com/prometheus/procfs/proc_maps.go
generated
vendored
Normal file
@ -0,0 +1,209 @@
|
||||
// Copyright 2019 The Prometheus 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.
|
||||
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package procfs
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// ProcMapPermissions contains permission settings read from /proc/[pid]/maps
|
||||
type ProcMapPermissions struct {
|
||||
// mapping has the [R]ead flag set
|
||||
Read bool
|
||||
// mapping has the [W]rite flag set
|
||||
Write bool
|
||||
// mapping has the [X]ecutable flag set
|
||||
Execute bool
|
||||
// mapping has the [S]hared flag set
|
||||
Shared bool
|
||||
// mapping is marked as [P]rivate (copy on write)
|
||||
Private bool
|
||||
}
|
||||
|
||||
// ProcMap contains the process memory-mappings of the process,
|
||||
// read from /proc/[pid]/maps
|
||||
type ProcMap struct {
|
||||
// The start address of current mapping.
|
||||
StartAddr uintptr
|
||||
// The end address of the current mapping
|
||||
EndAddr uintptr
|
||||
// The permissions for this mapping
|
||||
Perms *ProcMapPermissions
|
||||
// The current offset into the file/fd (e.g., shared libs)
|
||||
Offset int64
|
||||
// Device owner of this mapping (major:minor) in Mkdev format.
|
||||
Dev uint64
|
||||
// The inode of the device above
|
||||
Inode uint64
|
||||
// The file or psuedofile (or empty==anonymous)
|
||||
Pathname string
|
||||
}
|
||||
|
||||
// parseDevice parses the device token of a line and converts it to a dev_t
|
||||
// (mkdev) like structure.
|
||||
func parseDevice(s string) (uint64, error) {
|
||||
toks := strings.Split(s, ":")
|
||||
if len(toks) < 2 {
|
||||
return 0, fmt.Errorf("unexpected number of fields")
|
||||
}
|
||||
|
||||
major, err := strconv.ParseUint(toks[0], 16, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
minor, err := strconv.ParseUint(toks[1], 16, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return unix.Mkdev(uint32(major), uint32(minor)), nil
|
||||
}
|
||||
|
||||
// parseAddress just converts a hex-string to a uintptr
|
||||
func parseAddress(s string) (uintptr, error) {
|
||||
a, err := strconv.ParseUint(s, 16, 0)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return uintptr(a), nil
|
||||
}
|
||||
|
||||
// parseAddresses parses the start-end address
|
||||
func parseAddresses(s string) (uintptr, uintptr, error) {
|
||||
toks := strings.Split(s, "-")
|
||||
if len(toks) < 2 {
|
||||
return 0, 0, fmt.Errorf("invalid address")
|
||||
}
|
||||
|
||||
saddr, err := parseAddress(toks[0])
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
||||
eaddr, err := parseAddress(toks[1])
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
||||
return saddr, eaddr, nil
|
||||
}
|
||||
|
||||
// parsePermissions parses a token and returns any that are set.
|
||||
func parsePermissions(s string) (*ProcMapPermissions, error) {
|
||||
if len(s) < 4 {
|
||||
return nil, fmt.Errorf("invalid permissions token")
|
||||
}
|
||||
|
||||
perms := ProcMapPermissions{}
|
||||
for _, ch := range s {
|
||||
switch ch {
|
||||
case 'r':
|
||||
perms.Read = true
|
||||
case 'w':
|
||||
perms.Write = true
|
||||
case 'x':
|
||||
perms.Execute = true
|
||||
case 'p':
|
||||
perms.Private = true
|
||||
case 's':
|
||||
perms.Shared = true
|
||||
}
|
||||
}
|
||||
|
||||
return &perms, nil
|
||||
}
|
||||
|
||||
// parseProcMap will attempt to parse a single line within a proc/[pid]/maps
|
||||
// buffer.
|
||||
func parseProcMap(text string) (*ProcMap, error) {
|
||||
fields := strings.Fields(text)
|
||||
if len(fields) < 5 {
|
||||
return nil, fmt.Errorf("truncated procmap entry")
|
||||
}
|
||||
|
||||
saddr, eaddr, err := parseAddresses(fields[0])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
perms, err := parsePermissions(fields[1])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
offset, err := strconv.ParseInt(fields[2], 16, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
device, err := parseDevice(fields[3])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
inode, err := strconv.ParseUint(fields[4], 10, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pathname := ""
|
||||
|
||||
if len(fields) >= 5 {
|
||||
pathname = strings.Join(fields[5:], " ")
|
||||
}
|
||||
|
||||
return &ProcMap{
|
||||
StartAddr: saddr,
|
||||
EndAddr: eaddr,
|
||||
Perms: perms,
|
||||
Offset: offset,
|
||||
Dev: device,
|
||||
Inode: inode,
|
||||
Pathname: pathname,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ProcMaps reads from /proc/[pid]/maps to get the memory-mappings of the
|
||||
// process.
|
||||
func (p Proc) ProcMaps() ([]*ProcMap, error) {
|
||||
file, err := os.Open(p.path("maps"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
maps := []*ProcMap{}
|
||||
scan := bufio.NewScanner(file)
|
||||
|
||||
for scan.Scan() {
|
||||
m, err := parseProcMap(scan.Text())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
maps = append(maps, m)
|
||||
}
|
||||
|
||||
return maps, nil
|
||||
}
|
Reference in New Issue
Block a user