Commit Graph

43 Commits (98e6d2c1e552120f20d7d726c5779ecfcb7145e5)

Author SHA1 Message Date
Tim St. Clair 86d849e374
Separate Direct and Indirect streaming paths, implement indirect path with CRI 2016-11-03 13:26:33 -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
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
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
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
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
k8s-merge-robot a5cd171c2f Merge pull request #25064 from Clarifai/httpheaders-querystring
Automatic merge from submit-queue

Preserve query strings in HTTP probes instead of escaping them

Fixes a problem reported on Slack by devth.

```release-note
* Allow the use of query strings and URI fragments in HTTP probes
```

This might also preserve fragments, for those crazy enough to pass them.

I am using url.Parse() on the path in order to get path/query/fragment
and also deliberately avoiding the addition of more fields to the API.
2016-06-09 01:15:47 -07:00
k8s-merge-robot 59b7b1c550 Merge pull request #24921 from feiskyer/merge-exec
Automatic merge from submit-queue

Remove RunInContainer interface in Kubelet Runtime interface

According to #24689, we should merge RunInContainer and ExecInContainer in the container runtime interface. 

@yujuhong  @kubernetes/sig-node
2016-05-15 02:58:15 -07:00
Rudi Chiarito a2051b2d47 Preserve query strings in HTTP probes instead of escaping them
This might also preserve fragments, for those crazy enough to pass them.

I am using url.Parse() on the path in order to get path/query/fragment
and also deliberately avoiding the addition of more fields to the API.
2016-05-02 20:53:19 -04:00
feisky 831203c19b Remove RunInContainer interface in Kuberlete Runtime interface 2016-05-01 20:21:15 +08:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Rudi Chiarito a2d1bb7acf Add httpHeaders to httpGet liveness probe
Also update existing documentation and try to steer users away from 'host'.
Add validation.
2016-02-05 11:20:04 -05:00
Brendan Burns 07b3ab720d Improve error reporting a little in ingress e2e.
Also add Output() to the util/exec Cmd interface.
2016-01-06 15:25:04 -08:00
Random-Liu 6e92ddf9e1 Cleanup pod print in dockertools/manager.go, prober/prober.go and
runonce.go
2015-12-28 14:07:37 -08:00
Clayton Coleman 1d592e4c28 Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).

Did not change the metadata fields for now.
2015-11-26 11:45:25 -05:00
Avesh Agarwal 3d5207fd73 This commit adds type information to events.
This addresses issue #15624.
2015-11-24 09:59:54 -05:00
Tim Hockin ba383bcfeb Refactor IntOrString into a new pkg
pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
2015-11-16 10:57:52 -08:00
jiangyaoguo b0f0c294d9 make reasons constants with clarity 2015-11-09 23:42:14 +08:00
Tim St. Clair 1e88a682da Add liveness/readiness probe parameters
- PeriodSeconds - How often to probe
- SuccessThreshold - Number of successful probes to go from failure to success state
- FailureThreshold - Number of failing probes to go from success to failure state

This commit includes to changes in behavior:

1. InitialDelaySeconds now defaults to 10 seconds, rather than the
kubelet sync interval (although that also defaults to 10 seconds).
2. Prober only retries on probe error, not failure. To compensate, the
default FailureThreshold is set to the maxRetries, 3.
2015-11-06 10:46:40 -08:00
Tim St. Clair 07e9892003 Cleanup prober.prober 2015-10-21 15:45:34 -07:00
Tim St. Clair a263c77b65 Refactor liveness probing
This commit builds on previous work and creates an independent
worker for every liveness probe. Liveness probes behave largely the same
as readiness probes, so much of the code is shared by introducing a
probeType paramater to distinguish the type when it matters. The
circular dependency between the runtime and the prober is broken by
exposing a shared liveness ResultsManager, owned by the
kubelet. Finally, an Updates channel is introduced to the ResultsManager
so the kubelet can react to unhealthy containers immediately.
2015-10-19 15:15:59 -07:00
Tim St. Clair 551eff63b8 Use strong type for container ID
Change all references to the container ID in pkg/kubelet/... to the
strong type defined in pkg/kubelet/container: ContainerID

The motivation for this change is to make the format of the ID
unambiguous, specifically whether or not it includes the runtime
prefix (e.g. "docker://").
2015-10-07 10:58:05 -07:00
Tim St. Clair 52ece0c34e Refactor readiness probing
Each container with a readiness has an individual go-routine which
handles periodic probing for that container. The results are cached, and
written to the status.Manager in the pod sync path.
2015-10-02 15:37:10 -07:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
xiejunan f5446f2aa3 fix error in findPortByName
using ContainerPort instead of HostPort
2015-08-14 14:00:05 +08:00
jiangyaoguo 9ab4a46b9d Keep event reason in kubelet consistent with others 2015-08-12 19:00:09 +08:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Steve Kuznetsov 3008ff6150 Changed HTTPGetAction to allow user-defined schemes 2015-06-25 16:59:12 -04:00
Mike Danese 35771acdfa seperate readiness and liveness in the code 2015-06-11 15:09:27 -07:00
Tim Hockin a29240f2c5 reduce verbosity of log line 2015-05-21 13:09:18 -07:00
Tim Hockin 75617e8760 Better kubelet logging for probes
Log when we actually run probes and event when they fail.  Print the output of
a probe, too.
2015-05-20 08:56:45 -07:00
Yifan Gu 7831b7da72 kubelet/container: Move prober.ContainerCommandRunner to container.
Also include the ContainerCommandRunner in Runtime interface, but
still keep the ContainerCommandRunner interface for testability.
2015-05-11 15:32:51 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Alex Robinson f3352d96e6 Merge pull request #7595 from a-robinson/typo
Fix typo in kubelet prober code
2015-04-30 14:42:18 -07:00
Alex Robinson faa3292bb3 Fix typo in kubelet prober code. 2015-04-30 13:17:10 -07:00
Gao Zheng 95f2d1378f change probe.runner to probe.Runner as based 2015-04-30 10:36:38 +08:00
Gao Zheng 74975eff03 Fixes issue #7352
readinessProbe calls livenessProbe.Exec.Command which cause
"invalid memory address or nil pointer dereference".
2015-04-30 10:19:49 +08:00
Victor Marmol fe4600ba17 Move ComputePodChanges to DockerManager.
This logic is specific to the Docker runtime. This move is the first
step towards making syncPod() runtime-agnostic.
2015-04-29 14:00:37 -07:00
Victor Marmol f38c607285 Move Prober to its own subpackage.
This will allow it to be reused by the runtimes.
2015-04-29 10:11:28 -07:00