Commit Graph

210 Commits

Author SHA1 Message Date
Amim Knabben
0ed41c3f10 Deprecating --bootstrap-checkpoint-path flag 2020-06-09 15:27:01 -04:00
Kubernetes Prow Robot
99c50dfd3c
Merge pull request #85225 from DataDog/eric.mountain/cleanup_refmanager_master
Removes container RefManager
2020-05-28 16:37:15 -07:00
Kubernetes Prow Robot
0e37bcce2c
Merge pull request #88385 from tallclair/node-reviews
Remove tallclair from some OWNERS files
2020-05-24 20:23:11 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Ryan Phillips
348d9941b1 kubelet: tweak exec-probe log statement to be more concise 2020-05-13 11:42:43 -05:00
Tim Allclair
029a144ae9 Remove tallclair from some OWNERS files 2020-05-11 11:44:38 -07:00
Eric Mountain
22e0ee768b Removes container RefManager 2020-03-16 14:30:57 +01:00
Eric Mountain
4cb28f64ea Fixes for the No ref for container in probes after kubelet restart 2020-02-21 13:32:48 +01:00
Matthias Bertschy
66595d54a0 Add startupProbe result handling to kuberuntime 2019-11-13 08:12:54 +01:00
Zida
bc56cf45a5 Fix comment typos in prober 2019-10-10 14:53:08 +08:00
RainbowMango
f57bb81e95 Update bazel by hack/update-bazel.sh 2019-09-29 11:52:30 +08:00
RainbowMango
3b89ade154 Remove direct reference to Prometheus 2019-09-29 11:41:28 +08:00
Davanum Srinivas
5706a13bd6
Exec probes should not be unbounded
In 1f270ef4e2, we added 10KB as the read
limit for http probes. we should do the same for exec probes as well.

Change-Id: If154c5c4e669829ab94839c56260a894a6714f0f
2019-09-11 10:15:35 -04:00
Matthias Bertschy
a042a4b0ee startupProbe: make update 2019-08-30 00:42:43 +02:00
Matthias Bertschy
1a08ea5984 startupProbe: Test changes 2019-08-30 00:40:26 +02:00
Matthias Bertschy
323f99ea8c startupProbe: Kubelet changes 2019-08-30 00:40:26 +02:00
Han Kang
3a50917795 migrate kubelet's metrics/probes & metrics endpoint to metrics stability framework 2019-08-28 11:16:38 -07:00
Tim Allclair
8a495cb5e4 Clean up error messages (ST1005) 2019-08-21 10:40:21 -07:00
Ted Yu
2242e396d4 Pass desiredPods to CleanupPods 2019-07-03 10:35:13 +08:00
obitech
cbdfccc9f8 Fix golint issues in pkg/kubelet/secret 2019-06-20 19:56:29 +02:00
obitech
b767b1b250 Fix golint issues in pkg/kubelet/prober/results 2019-06-20 19:55:15 +02:00
obitech
897e8c0de6 Fix golint issues in pkg/kubelet/prober 2019-06-20 19:55:14 +02:00
mattjmcnaughton
46267759bc
Code cleanup for for probe/http
Two small code cleanup changes for `probe/http`.

- Tests name the `followNonLocalRedirects` variable before passing to
`New`, so its clear what the boolean flag in the construct impacts.
- Change import name from `httprobe` to `httpprobe` when used by
`pkg/kubelet/prober/prober.go`. Establishes consistency with other uses
in the repo.
2019-06-15 12:09:00 -04:00
SataQiu
c6a0f820d8 fix golint failures of pkg/kubelet/prober pkg/kubelet/secret 2019-05-31 17:08:53 +08:00
danielqsj
6d041abba7 remove metrics prober_probe_result 2019-04-04 17:03:11 +08:00
danielqsj
295d672d54 change kubelet probe metrics to counter type 2019-04-03 17:44:17 +08:00
Tim Allclair
e6ea4f0538 Don't follow non-local redirects for http probes 2019-03-15 11:04:30 -07:00
Elana Hashman
3539e89af2 Rename labels to match instrumentation guidelines
For the next release, we include both sets of labels for pods and
containers: "container_name" and "container", "pod_name" and "pod".
In future releases, the "*_name" metrics will be deprecated.
2019-01-28 12:36:20 -05:00
Hannes Hörl
0d4b5c98f8 Bump k8s.io/uitls to 8e7ff06
The reason for the bump is the new functionality of the
k8s.io/utils/exec package which allows
- to get a hold of the process' std{out,err} as `io.Reader`s
- to `Start` a process and `Wait` for it

This should help on addressing #70890 by allowing to wrap std{out,err}
of the process to be wrapped with a `io.limitedReader`.

It also updates
- k8s.io/kubernetes/pkg/probe/exec.FakeCmd
- k8s.io/kubernetes/pkg/kubelet/prober.execInContainer
- k8s.io/kubernetes/cmd/kubeadm/app/phases/kubelet.fakeCmd
to implement the changed interface.

The dependency on 'k8s.io/utils/pointer' to the new version has also
been bumped in some staging repos:
- apiserver
- kube-controller-manager
- kube-scheduler
2018-11-15 13:25:12 +00: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
Jon Friesen
b971c3e200 Fix golint for pkg/probe
This change adds comments to exported things and renames the tcp,
http, and exec probe interfaces to just be Prober within their
namespace.

Issue #68026
2018-09-12 14:18:16 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Tony Han
b49e07846f reset resultRun to 0 on pod restart 2018-04-19 22:58:19 +08:00
vikaschoudhary16
cedbd93255 Make 'pod' package to use unified checkpointManager
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2018-04-16 01:30:20 -04:00
Rohit Ramkumar
c0c5566c25 Expose kubelet health checks using new prometheus endpoint 2018-03-30 11:08:15 -07:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
huangjiuyuan
1a0ff90b12 Fix a typo in NewManager function 2017-11-06 15:40:23 +08:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Seth Jennings
343036e350 create separate transports for liveness and readiness probes 2017-10-01 21:45:43 -05:00
Kevin
f50761c9d4 fix prober ticking shift for kubelet restarted cases 2017-09-08 17:31:02 +08:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
ymqytw
9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw
3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Robin Yue
a0c173df26 revert workaround in PR 46246 as APIs have been consistent 2017-07-09 20:38:01 +08:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue
b641aedcac Merge pull request #46371 from sjenning/fix-liveness-probe-reset
Automatic merge from submit-queue

reset resultRun on pod restart

xref https://bugzilla.redhat.com/show_bug.cgi?id=1455056

There is currently an issue where, if the pod is restarted due to liveness probe failures exceeding failureThreshold, the failure count is not reset on the probe worker.  When the pod restarts, if the liveness probe fails even once, the pod is restarted again, not honoring failureThreshold on the restart.

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: busybox
spec:
  containers:
  - name: busybox
    image: busybox
    command:
    - sleep
    - "3600"
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
      initialDelaySeconds: 3
      timeoutSeconds: 1
      periodSeconds: 3
      successThreshold: 1
      failureThreshold: 5
  terminationGracePeriodSeconds: 0
```

Before this PR:
```
$ kubectl create -f busybox-probe-fail.yaml 
pod "busybox" created
$ kubectl get pod -w
NAME      READY     STATUS    RESTARTS   AGE
busybox   1/1       Running   0          4s
busybox   1/1       Running   1         24s
busybox   1/1       Running   2         33s
busybox   0/1       CrashLoopBackOff   2         39s
```

After this PR:
```
$ kubectl create -f busybox-probe-fail.yaml
$ kubectl get pod -w
NAME      READY     STATUS              RESTARTS   AGE
busybox   0/1       ContainerCreating   0          2s
busybox   1/1       Running   0         4s
busybox   1/1       Running   1         27s
busybox   1/1       Running   2         45s
```

```release-note
Fix kubelet reset liveness probe failure count across pod restart boundaries
```

Restarts are now happen at even intervals.

@derekwaynecarr
2017-06-03 15:15:49 -07:00
Shyam Jeedigunta
4425864707 Migrate kubelet configmap management logic to an interface 2017-05-31 10:39:36 +02:00
Seth Jennings
2c866a7aaa reset resultRun on pod restart 2017-05-24 14:55:53 -05:00
Derek Carr
f59069720e Fix kubelet event recording 2017-05-22 17:24:36 -04:00
Wojciech Tyczynski
bcfae7e1ed Extend Iptables interface with SaveInto 2017-05-19 20:44:25 +02:00
Kubernetes Submit Queue
a1684fea80 Merge pull request #42085 from cblecker/gofmt-fix
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

Fix gofmt errors

**What this PR does / why we need it**:
There were some gofmt errors on master. Ran the following to fix:
```
hack/verify-gofmt.sh | grep ^diff | awk '{ print $2 }' | xargs gofmt -w -s
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: none

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-17 15:39:07 -07:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Christoph Blecker
6681835b0c
Fix gofmt errors 2017-03-28 17:12:04 -07:00
Lou Yihua
63f1b077dc Add Host field to TCPSocketAction
Currently, TCPSocketAction always uses Pod's IP in connection. But when a
pod uses the host network, sometimes firewall rules may prevent kubelet
from connecting through the Pod's IP. This PR introduces the 'Host' field
for TCPSocketAction, and if it is set to non-empty string, the probe will
be performed on the configured host rather than the Pod's IP. This gives
users an opportunity to explicitly specify 'localhost' as the target for
the above situations.
2017-03-14 23:48:28 +08:00
Clayton Coleman
ce62f3d4a0
ExecProbes should be able to do simple env var substitution
For containers that don't have bash, we should support env substitution
like we do on command and args. However, without major refactoring
valueFrom is not supportable from inside the prober. For now, implement
substitution based on hardcoded env and leave TODOs for future work.
2017-02-28 22:46:04 -05:00
Chakravarthy Nelluri
0d2af70e95 Add support for attacher/detacher interface in Flex volume 2017-02-24 20:18:06 -05:00
David Ashpole
1d38818326 Revert "Merge pull request #41202 from dashpole/revert-41095-deletion_pod_lifecycle"
This reverts commit ff87d13b2c, reversing
changes made to 46becf2c81.
2017-02-15 08:44:03 -08:00
Kubernetes Submit Queue
fe4a254a70 Merge pull request #41176 from tanshanshan/fix-little2
Automatic merge from submit-queue

fix comment 

**What this PR does / why we need it**:

fix comment 

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-02-14 16:41:45 -08:00
David Ashpole
b224f83c37 Revert "[Kubelet] Delay deletion of pod from the API server until volumes are deleted" 2017-02-09 08:45:18 -08:00
tanshanshan
46b1256d34 fix wrong 2017-02-09 12:19:32 +08:00
David Ashpole
67cb2704c5 delete volumes before pod deletion 2017-02-08 07:34:49 -08:00
deads2k
8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k
c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Aleksandra Malinowska
74e1d8078e Revert "Delay deletion of pod from the API server until volumes are deleted" 2017-01-27 13:31:02 +01:00
David Ashpole
9094b57570 cleanup volumes before deleting from the api server 2017-01-25 10:21:15 -08:00
Wojciech Tyczynski
09e4de385c Enable nontrivial secret manager 2017-01-19 19:47:33 +01:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese
161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Chao Xu
03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Mike Danese
c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Chao Xu
bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
Rodolfo Carvalho
506129ba4e Add timeout argument to ExecInContainer
This allows us to interrupt/kill the executed command if it exceeds the
timeout (not implemented by this commit).

Set timeout in Exec probes. HTTPGet and TCPSocket probes respect the
timeout, while Exec probes used to ignore it.

Add e2e test for exec probe with timeout. However, the test is skipped
while the default exec handler doesn't support timeouts.
2016-11-07 13:00:59 +01:00
Tim St. Clair
86d849e374
Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -07:00
Mike Danese
3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Andy Goldstein
c3fe759fec Always return exec command output
Always return exec command output, even if the command invocation returns nonzero. This applies to
exec probes and kubelet RunInContainer calls.
2016-08-17 16:21:19 -04:00
Kubernetes Submit Queue
69419a145a Merge pull request #29802 from jfrazelle/fix-go-vet-errors
Automatic merge from submit-queue

fix go vet errors

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
```

This fixes the `go vet` errors brought about by go 1.7 testing re (#28742).

The are all pretty trivial and mostly related to literal composites.

also related to #16086
2016-08-15 13:10:08 -07:00
Jess Frazelle
7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Ke Zhang
1c13540671 get workers length shoud use RLock 2016-08-05 16:05:18 +08:00
Andrey Kurilin
9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
k8s-merge-robot
68632db799 Merge pull request #27562 from 7ing/ipt
Automatic merge from submit-queue

improve iptables-restore implementation #27559

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
fixes #27559
- improve restoreInternal implementation in iptables
- add SetStdin and SetStdout functions to Cmd interface
- modify kubelet/prober and some tests in order to work with Cmd interface
2016-08-02 08:02:32 -07:00
k8s-merge-robot
3786701280 Merge pull request #28865 from ronnielai/image-gc-0
Automatic merge from submit-queue

Moving event.go from kubelet/container to kubelet/events
2016-07-18 22:54:03 -07:00
k8s-merge-robot
50172148e4 Merge pull request #25273 from ncdc/exec-sigwinch
Automatic merge from submit-queue

Support terminal resizing for exec/attach/run

```release-note
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
```

Fixes #13585
2016-07-14 07:26:49 -07:00
Andy Goldstein
3b21a9901b Support terminal resizing for exec/attach/run
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
2016-07-13 17:06:16 -04:00
Daniel Smith
78c02cd052 Stop eating panics 2016-07-13 11:12:59 -07:00
Ron Lai
e6b745122d Moving event.go from kubelet/container to kubelet/events 2016-07-12 17:42:29 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Tim St. Clair
f2f3caf744 Rename **/manager.go 2016-06-21 15:11:31 -07:00
Jing Liu
ef66f1ead8 improve iptables-restore implementation #27559
- improve restoreInternal implementation in iptables
- add SetStdin and SetStdout functions to Cmd interface
- modify kubelet/prober and some tests in order to work with Cmd interface
2016-06-16 12:19:34 -07:00