Commit Graph

2116 Commits (990695c839a99cbd0e00fd3806f9802e2af7c2e0)

Author SHA1 Message Date
Travis Rhoden 766cf26897 Move original mount files back
Move original mount files back into pkg/util/mount. This move is done to
preserve git history.
2019-02-26 12:18:25 -07:00
Travis Rhoden f2438cacf5 Copy mount files to pkg/volume/util/subpath
Files in pkg/util/mount that contain significant code implementation for
subpaths are moved to a new package at pkg/volume/util/subpath. This
move is done in order to preserve git history.
2019-02-26 12:14:55 -07:00
Clayton Coleman 7f01e23380
Ignore the sticky gid mode bit when a test is running on memory EmptyDir
While running unit tests for perf on a Kube cluster with a memory backed
emptydir as TMPDIR, TestSafeMakeDir failed with:

```
--- FAIL: TestSafeMakeDir (0.01s)
	mount_linux_test.go:661: test "directory-exists": expected permissions 20000000750, got 20020000750
```

(TMPDIR set to /tmp/volume, /tmp/volume is EmptyDir with type Memory)

The test doesn't actually care about `os.ModeSetgid`, so specifically mask it out when testing this way.
2019-02-24 17:30:37 -08:00
danielqsj f7b437cae0 convert latency in mertics name to duration 2019-02-22 21:40:13 +08:00
danielqsj 0e78dd2d17 fix shellcheck in pkg/util/verify-util-pkg.sh 2019-02-22 15:10:16 +08:00
Kubernetes Prow Robot 9027738dd5
Merge pull request #73661 from andyzhangx/smb-mount-windows
fix smb remount issue on Windows
2019-02-15 14:04:59 -08:00
andyzhangx 660813c2d1 fix smb remount issue on Windows
add comments for doSMBMount func

fix comments about smb mount
2019-02-14 14:19:24 +00:00
Ed Bartosh 09a2e49a94 kubeadm: fix RequiredIPVSKernelModulesAvailable warning message
RequiredIPVSKernelModulesAvailable warning confuses users suggesting
that the IPVS proxier will not be used, which is not always the case.

Made the warning message less confusing:

        [WARNING RequiredIPVSKernelModulesAvailable]:
The IPVS proxier may not be used because the following required kernel
modules are not loaded: [ip_vs_rr ip_vs_wrr ip_vs_sh]
or no builtin kernel ipvs support was found: map[ip_vs_wrr:{}
ip_vs_sh:{} nf_conntrack_ipv4:{} ip_vs:{} ip_vs_rr:{}].
However, these modules may be loaded automatically by kube-proxy for you
if they are available on your system.

To verify IPVS support:

   Run "lsmod | grep 'ip_vs\|nf_conntrack'" and verify each of the above
modules are listed.

If they are not listed, you can use the following methods to load them:

1. For each missing module run 'modprobe $modulename' (e.g., 'modprobe
ip_vs', 'modprobe ip_vs_rr', ...)
2. If 'modprobe $modulename' returns an error, you will need to install
the missing module support for your kernel.

Fixes: kubernetes/kubeadm#975
2019-02-13 22:54:34 +02:00
Kubernetes Prow Robot 5b7a790d35
Merge pull request #72185 from dcbw/owners-label-sig-network
OWNERS: add label:sig/network to a bunch of places
2019-02-08 10:36:16 -08:00
Kubernetes Prow Robot b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Roy Lenferink b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Ashish Ranjan 7be223e798 Refactor to use k8s.io/utils/net/ package instead of kubernetes/pkg/util/net/sets
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2019-02-04 10:34:53 +05:30
Kubernetes Prow Robot 4331660fcd
Merge pull request #73445 from danielqsj/fix-exec
migrate the rest reference of pkg/util/exec to k8s.io/utils/exec
2019-02-01 17:14:15 -08:00
Daniel (Shijun) Qian e72b32558c
Merge branch 'master' into keymutex 2019-01-31 20:50:57 +08:00
Kubernetes Prow Robot 1f7e9fd9a2
Merge pull request #73488 from andrewsykim/replace-utils-file
Replace pkg/util/file with k8s.io/utils/path
2019-01-30 17:50:16 -08:00
Kubernetes Prow Robot fcbe7f50f2
Merge pull request #71767 from roycaihw/crd-metrics-rename
Log prometheus metric registration error and fix CRD metric names
2019-01-30 16:38:51 -08:00
danielqsj 6535689680 clean pkg/util/strings 2019-01-30 10:24:00 +08:00
danielqsj df7e4f3d49 clean pkg/util/keymutex 2019-01-30 10:23:59 +08:00
Andrew Kim 84191eb99b replace pkg/util/file with k8s.io/utils/path 2019-01-29 15:20:13 -05:00
Yi Tao d1f85ffa71 fix TestEntry 2019-01-29 20:57:26 +08:00
danielqsj c7a012f033 migrate the rest reference of pkg/util/exec to k8s.io/utils/exec 2019-01-29 10:55:10 +08:00
Andrew Kim 93b086f6ea replace k8s.io/apiserver/pkg/util/trace with k8s.io/utils/trace 2019-01-24 15:34:21 -05:00
Andrew Kim 2ea82cea20 replace pkg/util/nsenter with k8s.io/utils/nsenter 2019-01-24 13:49:04 -05:00
Andrew Kim 123590d911 replace pkg/util/io with k8s.io/utils/io 2019-01-24 13:49:04 -05:00
Kubernetes Prow Robot 3ebbbda3b7
Merge pull request #72679 from danielqsj/wqn
Mark deprecated in related workqueue metrics
2019-01-19 06:52:04 -08:00
Kubernetes Prow Robot 5b4b40cfe0
Merge pull request #72391 from cofyc/fix72387
Deprecate mount.IsNotMountPoint in favor of mounter.IsNotMountPoint
2019-01-18 19:13:49 -08:00
Kubernetes Prow Robot cc67ccfd7f
Merge pull request #71731 from cheftako/leaseMetric
Add gauge metric for master of leader election.
2019-01-08 08:57:53 -08:00
danielqsj 9325c75f55 Mark deprecated in related workqueue metrics 2019-01-08 18:08:09 +08:00
Yecheng Fu 037ab98521 Deprecate mount.IsNotMountPoint 2019-01-06 20:25:31 +08:00
Kubernetes Prow Robot 39529006f0
Merge pull request #68128 from dixudx/util_nsenter_owner
add myself to util/nsneter owners
2019-01-05 01:35:24 -08:00
Michelle Au 7a4f906f25 Rename UnmountMountPoint to CleanupMountPoint 2019-01-03 16:35:54 -08:00
Michelle Au 1dacde1210 Move linux test utils to os-independent test file 2019-01-03 16:35:54 -08:00
Michelle Au f33d5d3b05 Add comments around use of PathExists 2019-01-03 16:34:53 -08:00
Michelle Au 57c7a200f0 Add unit test for UnmountMountPoint 2019-01-03 16:34:53 -08:00
Michelle Au 15d44a64e9 Update doCleanSubpaths to use UnmountMountPoint 2019-01-03 16:34:53 -08:00
Michelle Au 002a4e33d8 Move unmount volume util from pkg/volume/util to pkg/util/mount 2019-01-03 16:34:53 -08:00
Kubernetes Prow Robot 7284660483
Merge pull request #71300 from danielqsj/71165
Use prometheus conventions for workqueue metrics
2018-12-31 21:18:45 -08:00
Walter Fender f192657380 Add gauge metric for master of leader election.
Fixes #71730
0 indicates standby, 1 indicates master, label indicates which lease.
Tweaked name and documentation
Factored in Mike Danese feedback.
Removed dependency on prometheus from client-go using adapter.
Centralized adapter import.
Fixed godeps
Fixed boilerplate.
Put in fixes for caesarxuchao
2018-12-27 09:40:33 -08:00
Laurent Bernaille 1412d53b62 [kube-proxy/ipvs] Protect Netlink calls with a mutex 2018-12-27 10:53:27 +01:00
Kubernetes Prow Robot 68451f301b
Merge pull request #72291 from msau42/fix-subpath-orphan
Fix subpath issues with orphaned pod cleanup
2018-12-26 19:48:27 -08:00
Michelle Au 3ebbbbd5d8 Leave refactoring TODO 2018-12-26 10:49:28 -08:00
Jonathan Basseri ec247ca0be Add godoc to pkg/util/configz.
Document the intended use of this package. In particular, document the
fact that it is intended for ComponentConfig.
2018-12-19 17:38:30 -08:00
Dan Williams 2e339188ed OWNERS: add label:sig/network to a bunch of places 2018-12-19 00:00:02 -06:00
Walter Fender d92ee41e44 Fix issue where missing external IP address breaks SSH Tunnel.
Added unit test to cover missing external IP case.
Justin's feedback.
Lint fix.
Lavalmap's feedback.
2018-12-12 10:59:32 -08:00
danielqsj 42214c5ac4 Using histogram metrics instead of summary 2018-12-12 17:53:24 +08:00
danielqsj b828bc1a50 Use prometheus conventions for workqueue metrics 2018-12-12 16:55:13 +08:00
Kubernetes Prow Robot f0bae6e9c5
Merge pull request #71573 from JacobTanenbaum/UDP_conntrack
Correctly Clear conntrack entry on endpoint changes when using nodeport
2018-12-07 15:01:43 -08:00
Haowei Cai b109fda56d generated 2018-12-06 16:36:14 -08:00
Haowei Cai c449c2735f Log metric registration error 2018-12-05 19:05:30 -08:00
Jacob Tanenbaum 144280e7a7 Correctly Clear conntrack entrty on endpoint changes when using nodeport
When using NodePort to connect to an endpoint using UDP, if the endpoint is deleted on
restoration of the endpoint traffic does not flow. This happens because conntrack holds
the state of the connection and the proxy does not correctly clear the conntrack entry
for the stale endpoint.

Introduced a new function to conntrack ClearEntriesForPortNAT that uses the endpointIP
and NodePort to remove the stale conntrack entry and allow traffic to resume when
the endpoint is restored.

Signed-off-by: Jacob Tanenbaum <jtanenba@redhat.com>
2018-12-03 15:02:48 -05:00
Jan Safranek cfbf6aa925 Fix unit test to run with random UID
User that runs the tests desn't need to be in /etc/passwd and thus
user.Current() can fail. Assume the user is not root in this case.
2018-11-19 13:08:54 +01:00
k8s-ci-robot bc6aee19b0
Merge pull request #70884 from lavalamp/workqueue
add a metric that can be used to notice stuck worker threads
2018-11-13 14:59:27 -08:00
Daniel Smith 980242c209 fixup! add longest_running_processor_microseconds metric 2018-11-12 21:57:57 -08:00
Daniel Smith fd77aa5a41 add longest_running_processor_microseconds metric 2018-11-12 10:52:18 -08:00
Daniel Smith 578962d934 fixup! Test workqueue metrics
change units to seconds
2018-11-10 18:46:43 -08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Daniel Smith 6195d1005d add a metric that can be used to notice stuck worker threads 2018-11-09 10:50:11 -08:00
Weibin Lin 7a591ed361 update bazel 2018-11-05 10:33:31 +08:00
Weibin Lin 4b90559369 use 'nf_conntrack' instead of 'nf_conntrack_ipv4' for linux kernel >= 4.19 2018-11-05 10:33:31 +08:00
k8s-ci-robot 5fdad5c19f
Merge pull request #68771 from liyongxin/master
typo fix from utilites to utilities
2018-11-03 16:50:28 -07:00
k8s-ci-robot 0be22d8ace
Merge pull request #70230 from qingsenLi/git181025
fix golint for /pkg/util/ipconfig and /pkg/util/resourcecontainer
2018-10-31 11:50:23 -07:00
k8s-ci-robot 4c874dbefe
Merge pull request #66367 from cpuguy83/speedup_pidof
getPids - don't recursively traverse every dir in /proc
2018-10-29 15:53:41 -07:00
qingsenLi ca74d32e4c fix golint for /pkg/util/ipconfig and /pkg/util/resourcecontainer-2 2018-10-26 23:58:30 +08:00
tanshanshan 0ecff590bb fix golint for some of pkg/util 2018-10-17 10:11:49 +08:00
WanLinghao fe3131ba87 clean all unused packages under pkg/util 2018-10-15 09:54:08 +08:00
k8s-ci-robot 3dbb1481f2
Merge pull request #69491 from chrischdi/lint-pkg-util-strings
fix golint errors in pkg/util/strings
2018-10-11 18:26:43 -07:00
k8s-ci-robot cda667e217
Merge pull request #69515 from WanLinghao/clean_term
clean unused package: pkg/util/term
2018-10-11 13:45:32 -07:00
k8s-ci-robot 820c9eef3f
Merge pull request #69512 from islinwb/reuse_GetNodeIP
Reuse func getNodeIP
2018-10-11 13:45:22 -07:00
Jan Safranek 0b8c472578 Fixed subpath in containerized kubelet.
IsNotMountPoint should return no error when the checked directory does not
exists - missing directory can't be mounted. Therefore containerized
kubelet should check if the target exists first before resolving symlinks.
EvalHostSymlinks() returns indistinguishible error in case the path does
not exist.
2018-10-09 13:11:23 +02:00
Weibin Lin 2d2ecb15d2 update bazel 2018-10-09 10:27:27 +08:00
Weibin Lin 0d57ec2938 reuse func getNodeIP 2018-10-09 10:27:27 +08:00
WanLinghao 26837d4858 clean unused package: pkg/util/term 2018-10-08 18:19:20 +08:00
Christian Schlotter 398039b36e fix golint errors in pkg/util/strings
Signed-off-by: Christian Schlotter <christi.schlotter@gmail.com>
2018-10-06 13:35:19 +02:00
k8s-ci-robot ecfd1a3e56
Merge pull request #68945 from gnufied/fix-mount-options
Make sure we pass mount options while creating bind mounts
2018-10-01 09:27:54 -07:00
k8s-ci-robot 577e06e0b8
Merge pull request #69222 from SataQiu/fix-2018092805
fix typo
2018-10-01 04:40:34 -07:00
liangwei 456c351e31 fix bugs introduced by ipvs graceful termination 2018-09-30 16:40:13 +08:00
SataQiu 94a653f100 fix typo 2018-09-28 23:41:24 +08:00
liangwei 9e4f84f42e ipvs connection based graceful termination 2018-09-27 15:16:48 +08:00
liangwei 80ff8b359c ipvs support graceful termination 2018-09-27 15:14:51 +08:00
k8s-ci-robot 3fe21e5433
Merge pull request #68922 from BenTheElder/version-staging
move pkg/util/version to staging
2018-09-26 22:59:42 -07:00
k8s-ci-robot 29cff0d518
Merge pull request #68741 from jsafrane/fix-var-symlink
Fixed subpath cleanup when /var/lib/kubelet is a symlink.
2018-09-26 14:42:44 -07:00
Hemant Kumar 6eda6d1a06 Make sure we pass mount options while creating bind mounts
This fixes an inconsitency that exists in mounter
2018-09-26 15:12:05 -04:00
k8s-ci-robot c7a67b3e1b
Merge pull request #68626 from gnufied/fix-netdev-mount-opt
Apply _netdev mount option in bind mount if available
2018-09-25 17:00:36 -07:00
k8s-ci-robot 450fdc9c09
Merge pull request #68608 from andyzhangx/UnmountDevice-windows
fix UnmountDevice failure on Windows
2018-09-25 17:00:17 -07:00
k8s-ci-robot 30bf07a8bc
Merge pull request #68344 from Nordix/nordix-dev
Include all used hash types in compare when creating ipsets
2018-09-25 14:40:51 -07:00
k8s-ci-robot cdfd62ffb9
Merge pull request #68263 from islinwb/patch-1
add a missing "%s"
2018-09-25 06:13:53 -07:00
Benjamin Elder 8b56eb8588 hack/update-gofmt.sh 2018-09-24 12:21:29 -07:00
Benjamin Elder f828c6f662 hack/update-bazel.sh 2018-09-24 12:03:24 -07:00
Benjamin Elder 088cf3c37b find & replace version import 2018-09-24 12:03:24 -07:00
Benjamin Elder e01cb6fe80 hack/update-bazel.sh 2018-09-24 12:00:00 -07:00
Benjamin Elder b22d036cf8 move pkg/util/version into staging 2018-09-24 12:00:00 -07:00
andyzhangx 74f010260f fix UnmountDevice failure on Windows
add comments

fix test failure
2018-09-19 01:44:01 +00:00
David Zhu 704573d304 GetMountRefs shouldn't error when file doesn'g exist in Windows and nsenter. Add unit test 2018-09-18 10:45:02 -07:00
Yongxin Li 6a98ce78e4 typo fix from utilites to utilities
Signed-off-by: Yongxin Li <yxli@alauda.io>
2018-09-18 13:52:04 +08:00
David Zhu 9d207b3e3c GetMountRefs should not fail if the path supplied does not exist anymore. It has no mount references 2018-09-17 17:35:12 -07:00
Jan Safranek 9e24ccbda0 Fixed subpath cleanup when /var/lib/kubelet is a symlink. 2018-09-17 15:52:25 +02:00
Hemant Kumar e881a29107 Apply _netdev mount option in bind mount if available
_netdev mount option is a userspace mount option and
isn't copied over when bind mount is created and remount
also does not copies it over and hence must be explicitly
used with bind mount
2018-09-13 13:47:34 -04:00
Lars Ekman e818b8ffc5 Fix issue #68338
The ipset KUBE-LOAD-BALANCER-SOURCE-CIDR is not recogized as
a hash set
2018-09-06 11:00:14 +02:00
Kubernetes Submit Queue c3062bae21
Merge pull request #68233 from luxas/ccm_cleanup
Automatic merge from submit-queue (batch tested with PRs 68171, 67945, 68233). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Move the CloudControllerManagerConfiguration to an API group in `cmd/`

**What this PR does / why we need it**:
This PR is the last piece of https://github.com/kubernetes/kubernetes/issues/67233.
It moves the `CloudControllerManagerConfiguration` to its own `cloudcontrollermanager.config.k8s.io` config API group, but unlike the other components this API group is "private" (only available in `k8s.io/kubernetes`, which limits consumer base), as it's located entirely in `cmd/` vs a staging repo.
This decision was made for now as we're not sure what the story for the ccm loading ComponentConfig files is, and probably a "real" file-loading ccm will never exist in core, only helper libraries. Eventually the ccm will only be a library in any case, and implementors will/can use the base types the ccm library API group provides. It's probably good to note that there is no practical implication of this change as the ccm **cannot** read ComponentConfig files. Hencec the code move isn't user-facing.

With this change, we're able to remove `pkg/apis/componentconfig`, as this was the last consumer. That is hence done in this PR as well (so the move is easily visible in git, vs first one "big add" then a "big remove"). The only piece of code that was used was the flag helper structs, so I moved them to `pkg/util/flag` that I think makes sense for now.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: kubernetes/community#2354

**Special notes for your reviewer**:

This PR builds on top of (first two commits, marked as `Co-authored by: @stewart-yu`) https://github.com/kubernetes/kubernetes/pull/67689

**Release note**:

```release-note
NONE
```
/assign @liggitt @sttts @thockin @stewart-yu
2018-09-05 21:36:41 -07:00